Telerik UI for Silverlight

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.

Tip

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.

Note

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.

CopyC#
RadWindow radWindow = new RadWindow();
radWindow.Header = "My RadWindow";
CopyVB.NET
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 IconTemplate property of the RadWindow.

CopyXAML
<UserControl.Resources>
    <DataTemplate x:Key="WindowHeaderTemplate">
        <TextBlock Text="My RadWindow" />
    </DataTemplate>
</UserControl.Resources>
CopyC#
RadWindow radWindow = new RadWindow();
radWindow.HeaderTemplate = this.Resources[ "WindowHeaderTemplate" ] as DataTemplate;
CopyVB.NET
Dim radWindow As New RadWindow()
radWindow.HeaderTemplate = TryCast(Me.Resources("WindowHeaderTemplate"), DataTemplate)

 

See Also