Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
124 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...