I need to allow user to change themes dynamically in an application created using telerik WPF controls.
I am setting binding to each and every telerik control in my XAML as follows:
XAML:
telerik:StyleManager.Theme="{Binding SelectedSMTheme, Mode=TwoWay}"
ViewModel:
private Theme selectedSMTheme;
public Theme SelectedSMTheme
{
get
{
return selectedSMTheme;
}
set
{
selectedSMTheme = value;
RaisePropertyChange("SelectedSMTheme");
}
}
And changing this SelectedSMTheme whenever user select a theme.
Changing Theme:
SelectedSMTheme = new Expression_DarkTheme();
Is there any other way to change themes for telerik controls while running application. Because, here I need to specify telerik:StyleManager.Theme to each n every control throughout the application.