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

Window Header

The RadWindow allows you to display a header in the top part of it. To specify the header you can use either the Header or the HeaderTemplate properties.

If you have a window-specific header, use the Header property.

As the Header property is of type object you can set it to any control that you like. If you want to have a more complex icon content that consists of more than one control, be sure to wrap them inside a layout control and pass the layout control as content.

It's not a good practice do declare your RadWindow as visual element in XAML. The only scenario, when it is meaningful to use the RadWindow in XAML, is when it represents the entire user control. To learn more about that read here.

RadWindow radWindow = new RadWindow(); 
radWindow.Header = "My RadWindow"; 
Dim radWindow As New RadWindow() 
radWindow.Header = "My RadWindow" 

If you want to share a common icon layout structure for the content of multiple windows, define an appropriate DataTemplate and set it to the HeaderTemplate property of the RadWindow.

    <DataTemplate x:Key="WindowHeaderTemplate"> 
        <TextBlock Text="My RadWindow" /> 

RadWindow radWindow = new RadWindow(); 
radWindow.HeaderTemplate = this.Resources["WindowHeaderTemplate"] as DataTemplate; 
Dim radWindow As New RadWindow() 
radWindow.HeaderTemplate = TryCast(Me.Resources("WindowHeaderTemplate"), DataTemplate) 

WPF RadWindow Custom Header Template

See Also

In this article