Hello. I have a RadMenu with a custom style applied:
I also have a button that when clicked will run this code...
I've stepped through the code and it fires and seems to change the style, but the appearance of the RadMenu doesn't change... Any suggestions as to what I am doing wrong? (If it matters, my button is inside one of the RadMenuItems.)
<RadNav:RadMenu x:Name="rm" Style="{StaticResource rm}" ItemContainerStyle="{StaticResource rmi1}"> |
<RadNav:RadMenuItem x:Name="rmi" ItemContainerStyle="{StaticResource rmi1}"> |
... </RadNav:RadMenuItem> |
</RadNav:RadMenu> |
I also have a button that when clicked will run this code...
private void btn_Click(object sender, RoutedEventArgs e) |
{ |
this.rm.ItemContainerStyle = App.Current.Resources["rmi2"] as Style; |
this.rmi.ItemContainerStyle = App.Current.Resources["rmi2"] as Style; |
} |
I've stepped through the code and it fires and seems to change the style, but the appearance of the RadMenu doesn't change... Any suggestions as to what I am doing wrong? (If it matters, my button is inside one of the RadMenuItems.)