Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
133 views
in Technique[技术] by (71.8m points)

c# - Creating custom forms in WPF?

I'm currently learning WPF. I really am enjoying it so far. I love how easy it is to make great looking apps, and would like to create an app that has a custom window border. I would like for it to look something like this:

image

I know I could just easily change the Window type to not have a boarder and go from there, but that seems to much like WinForms. Wouldn't it be better to just create a class that derived from Window and styled it? If so how can I do this? Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Here's a great article on customizing Window "chrome" with WPF:

Custom Window Chrome in WPF

It is accompanied by a Code Gallery project from which you can download the code:

WPF Chrome


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...