I am creating a UserControl in Silverlight 4 which has a watermarked background.
The watermark should change depending on the underlying ‘type’ the UserControl is representing.
The watermark is created using a Path and I have extracted all the properties into a style.
I was wondering if it would be possible to change the style of the Path at runtime based on some known value.
I am using MVVM and Unity. Perhaps I could bind the style somehow? Or could I inject the style when the view is created?
I may have to do this with control templates, hence the reference in the title.
Thanks…
Instead of using control templates to change the style of the watermark, why dont you use the VisualStateManager to change the state of the watermark based on the ‘type’.