For programmers who enjoy turning common controls into uncommon visual objects, Windows Presentation Foundation (WPF) offers an exciting feature known as the template. By creating a new template—most often in XAML without a lick of code—you can completely revise the visual appearance of the control without having to modify the control’s code.
In the January issue of MSDN Magazine, Charles Petzold demonstrates how you can define default replaceable templates for controls distributed in dynamic link libraries. Charles uses a CalendarControls library that contains code and default templates for three unique calendar controls.
Don’t forget to browse the code in our online code library.