WinForms vs WPF

I just finished a calendar control with customizable colors (as an exercise mainly) and then I wanted to use it in a new Modern UI (Metro) theme.


This exercise with a custom calendar control lets you get wild with colors.

Ugh, I had done all my work using the WinForms framework: System.Windows.Drawing.

The Modern UI is built using WPF which uses System.Windows.Media.

So now I am learning how to use the WPF equivalents — and the not-so-equivalents.

Interesting to note that one framework uses the name “Color” while the other uses “Colors”.  However, the two are not directly interchangeable.

WinForms Example:

// Main Border Color
private Color m_BorderColor Color.Black ;

vs the WPF example:

// Main Border Color
private Brush m_BorderColor = new SolidColorBrush(Colors.Black);

The Modern UI Look:

Here is the calendar control in the Modern UI Metro look




Proactive technologist.

Posted in New, WPF

What do you think?