We have an application in which we have default management styles defined as an implicit style.
XAML:
<Style TargetType="Button"> [...] </Style>
These styles are now applied to each button of the application.
Sometimes we change the style in the code to another.
XAML:
<Style x:Key="HighlightStyle" TargetType="Button"> [...] </Style>
code:
cmdButton.Style = App.Current.Resources("HighlightStyle")
Then again we want to remove the style and return to the implicit style, but this is not possible:
code:
cmdButton.Style = Nothing
Results in unchanged Button .
I also read here http://www.silverlightshow.net/items/Implicit-Styles-in-Silverlight-4.aspx that all implicit style should be accessible using TargetType-Value as a key, but that doesnโt mean t. seems to work too.
Does anyone know about this?
source share