views:

35

answers:

1

I would normally just create a static class like StandardFooColors and create a static field for each standard color. However, with WPF I could also put these in a resource dictionary. Just wondering if there is a recommended way to do this or if it is 6 of 1 or half dozen of the other?

+1  A: 

I suggest you use a ResourceDictionary. This will also give you the option to associate color (xaml) files with different "skins", and easily switch between them on-the-fly.

Plus, it is easier to define complex colors and brushes in xaml than it is in code.

Captain