Simple Styles
Control templating in WPF is super powerful, but can be tough to get right. There is a lot of minutae to keep track of to build a control template that works correctly. This is especially true for some of the more complex controls (like Menu or ScrollBar).
In an attempt, then, to give you a better starting point, I’ve put together a handful of “simple†styles. Simple for two reasons: first is a simple design aesthetic—these are designed with the idea that they are a base for your own design kung-fu. They are also simple in implementation—I’ve minimized the unnecessary goo so it should be easier to see what’s going on.
February CTP
This version was a total rewrite and now the ever expanding list of controls includes: Button, CheckBox, RadioButton, TextBox, PasswordBox, ComboBox, Slider, ListBox, TreeView, TabControl, Expander, GroupBox, ProgressBar, Menu, ContextMenu, ToolTip, and ScrollBar.
Some notes about this release: It does not include property bindings for many properties. You won’t, for example, be able to specify the placement location of the tabs in TabControl. They will always be at the top. I didn’t even include bindngs from common properties like Background, BorderBrush, etc. This allowed me to make some pretty signficant simplifications to the templates. Let me know what you think of the trade-off. If they’re useful, we can add some of the back in.
In the spirit of customization, however, I did make a point of sticking to a “palette” of resources for all of the colors. No style should have any hardcoded colors. Instead they all depend on a merged ResourceDictionary called “Shared.xaml.” You can tweak colors in that file and the complete set should get updated in a sensible way. I’d also love feedback on the usefulness of this.
