This is a migrated thread and some comments may be shown as answers.

RadDesktopAlertManager styling via DesktopAlertParameters DesktopAlertStyle

1 Answer 20 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Oleg
Top achievements
Rank 1
Oleg asked on 05 Jan 2018, 05:38 PM

I have an application which uses VistaTheme. If I want RadDesktopAlertManager to be using VisualStudio2013Theme, can I do that via DesktopAlertParameters DesktopAlertStyle somehow? Or in any other way?

1 Answer, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 10 Jan 2018, 11:43 AM
Hello,

If you set the Vista theme as application theme through StyleManager, you can set a different theme on control level by using the StyleManager.SetTheme method:
var alert = this.CreateAlert();
StyleManager.SetTheme(alert, new VisualStudio2013Theme());
this.bottomRightManager.ShowAlert(alert);

where:
private RadDesktopAlertManager bottomRightManager = new RadDesktopAlertManager(AlertScreenPosition.BottomRight, 10);

 If you use NoXaml and implicit themes, you will need to merge the VisualStudio2013 resources as follows:
var alert = this.CreateAlert();
 
alert.Resources.MergedDictionaries.Add(new ResourceDictionary()
{
    Source = new Uri("/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.xaml", UriKind.RelativeOrAbsolute)
});
alert.Resources.MergedDictionaries.Add(new ResourceDictionary()
{
    Source = new Uri("/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml", UriKind.RelativeOrAbsolute)
});
 
this.bottomRightManager.ShowAlert(alert);

I hope this helps.


Regards,
Sia
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Oleg
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or