BLOGS BY TOPIC▼
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
We think - cautiously - that WPF is a better platform for client tool development than Windows Forms. This blog gives 10 reasons why.
- 10 reasons why WPF is better than Windows Forms
- WPF Forms are Quicker to Create
- Flow Layout Trumps Absolute Positioning
- WPF Works for Websites
- Styles are Much Better in WPF (this blog)
- WPF is (I think) the Way of the Future
- Better Data Binding
- Selecting Controls in the Document Outline Window
- Triggers
- StoryBoards and Animations
- Drawing!
Posted by Andy Brown on 25 September 2012
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
4 - Styles are Much Better in WPF
Perhaps I should have put this as reason number one. Suppose that you want all buttons to appear the same:

Both buttons have the same margins, padding and background colour.
I can't think of an easy way to achieve this in WinForms. In WPF, you'd just create a style:

The styles for the buttons shown above.
Although style syntax is very different from CSS, WPF styles work the same way. You can even create something called resource dictionaries (similar to CSS style sheets) allowing you to change the appearance of forms instantly.
You can also create named styles in WPF (so some buttons could look different from others), and inherited styles (so a button could look similar to all others, but with one additional tweak).
- 10 reasons why WPF is better than Windows Forms
- WPF Forms are Quicker to Create
- Flow Layout Trumps Absolute Positioning
- WPF Works for Websites
- Styles are Much Better in WPF (this blog)
- WPF is (I think) the Way of the Future
- Better Data Binding
- Selecting Controls in the Document Outline Window
- Triggers
- StoryBoards and Animations
- Drawing!