bookmark again for today: Setting a style (once) in C#
You can do this change style programatically with c#:
button.Style = Application.Current.Resources["TopMenuItemButton"] as Style; // If your style is defined in App.xaml Application.Resources section
button.Style = this.Resources[StyleKey] as Style; // if your style is defined in Page.XAML UserControl.Resources section
button.Style = button.Resources[StyleKey] as Style; // if your style is defined in the XAML as control.Resouces section
sladapter
Software Engineer
Aprimo, Inc
You can do this change style programatically with c#:
button.Style = Application.Current.Resources["TopMenuItemButton"] as Style; // If your style is defined in App.xaml Application.Resources section
button.Style = this.Resources[StyleKey] as Style; // if your style is defined in Page.XAML UserControl.Resources section
button.Style = button.Resources[StyleKey] as Style; // if your style is defined in the XAML as control.Resouces section
sladapter
Software Engineer
Aprimo, Inc
Comments