New to Telerik UI for WPF? Download free 30-day trial

Switching Icons at Runtime

The IconResource extension is a markup extension that allows you to switch icons in your application at runtime. More information on the approach is available here.

Using Available IconSets

RadRichTextBox comes with three separate sets of icons that can be used in its UI. They reside in the Telerik.Windows.Controls.RichTextBoxUI.dll and defining an IconSources resource for them is demonstrated in Example 1.

Example 1: Creating IconSources

<telerik:IconSources x:Key="IconSources"  
     LightBasePath="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/"  
     DarkBasePath="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/Dark/" 
     ModernBasePath="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/Modern/" /> 

To browse all icons you can download the source code of the controls from your Telerik account. The images are located at \Telerik_UI_for_WPF_Source_[Version]\Controls\RichTextBox\RichTextBoxUI\Images.

See Also

In this article