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

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

Example 1: Creating IconSources

<telerik:IconSources x:Key="IconPaths" LightBasePath="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/"  
                                       DarkBasePath="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/Dark" 
                                       ModernBasePath="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/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\PdfViewer\FixedDocumentViewers\Images.

See Also

In this article