I have some functionality in my project that, in the interest of speed, I just cut and pasted to the places I needed it. It's a bit of XAML and code that manages a document list. Now that I have a bit of time to focus on it, I'd like to encapsulate that bit into a usercontrol that I can drop in and replace the duplicated XAML and code.
One question I have... The control would have to use different colors for it's primary elements, depending on which area it is being used in. At the moment, I am just assigning the colors directly to the elements that need it via a static resource I have declared. How would I expose a property, from the user control, for the primary color to be used?
Do I create the property in the code-behind of the usercontrol and then assign it in the XAML where it's used? And if so, how do I do that with a static resource?
Thanks.
J
http://digitalcamel.blogspot.com/