New to Telerik UI for WinFormsStart a free 30-day trial

Accessing and Customizing Elements

Updated over 6 months ago

Accessing and customizing elements can be performed at run time. Before proceeding with this topic, it is recommended to get familiar with the visual structure of the RadDesktopAlert.

The following code example demonstrates how to customize the nested elements at run time:

Figure 1: Customize elements

WinForms RadDesktopAlert Customize elements

Customize elements

C#
            
this.radDesktopAlert1.Popup.AlertElement.CaptionElement.TextAndButtonsElement.TextElement.ForeColor = Color.Red;
this.radDesktopAlert1.Popup.AlertElement.CaptionElement.CaptionGrip.BackColor = Color.Red;
this.radDesktopAlert1.Popup.AlertElement.CaptionElement.CaptionGrip.GradientStyle = GradientStyles.Solid;
this.radDesktopAlert1.Popup.AlertElement.ContentElement.Font = new Font("Arial", 8f,FontStyle.Italic);
this.radDesktopAlert1.Popup.AlertElement.ContentElement.TextImageRelation = TextImageRelation.TextBeforeImage;
this.radDesktopAlert1.Popup.AlertElement.BackColor = Color.Yellow;
this.radDesktopAlert1.Popup.AlertElement.GradientStyle = GradientStyles.Solid;
this.radDesktopAlert1.Popup.AlertElement.BorderColor = Color.Red;
Not finding the help you need?
Contact Support