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


The RadWindowInteropHelper helper class assists for the interoperation between Windows Presentation Foundation (WPF) and Win32 code.

Here is a brief list of all attached properties exposed by the class:

  • ClipMaskCornerRadius: The CornerRadius used to create a clipping mask on the underlying Window.
  • AllowTransparency: Gets or sets the AllowTransparency property of the underlying Window.
  • OpaqueWindowBackground: The Brush used to render the Background of the underlying window if AllowTransparency is set to False.
  • Title: Gets or sets the Title used to display in the OS for the underlying Window.
  • Icon: Gets or sets the ImageSource used to display the Icon in the OS for the underlying Window.
  • ShowInTaskbar: Gets or sets the ShowInTaskbar property of the underlying Window.

Example 1 demonstrates how to set each of the properties both in XAML and code-behind while Figure 1 and Figure 2 illustrate the final result.

Example 1: Set RadWindowInteropHelper attached properties

<telerik:RadWindow x:Class="ProjectNamespace.CustomWindow" 
    navigation:RadWindowInteropHelper.Title="Custom Window" 
    navigation:RadWindowInteropHelper.ShowInTaskbar="True" > 
    <!-- ... --> 

Example 1: Set RadWindowInteropHelper attached properties

RadWindowInteropHelper.SetClipMaskCornerRadius(this, new CornerRadius(0)); 
RadWindowInteropHelper.SetAllowTransparency(this, false); 
RadWindowInteropHelper.SetOpaqueWindowBackground(this, Brushes.Red); 
RadWindowInteropHelper.SetTitle(this, "Custom Window"); 
RadWindowInteropHelper.SetIcon(this, new BitmapImage(new Uri("../../icon.png", UriKind.RelativeOrAbsolute))); 
RadWindowInteropHelper.SetShowInTaskbar(this, true); 
RadWindowInteropHelper.SetClipMaskCornerRadius(Me, New CornerRadius(0)) 
RadWindowInteropHelper.SetAllowTransparency(Me, False) 
RadWindowInteropHelper.SetOpaqueWindowBackground(Me, Brushes.Red) 
RadWindowInteropHelper.SetTitle(Me, "Custom Window") 
RadWindowInteropHelper.SetIcon(Me, New BitmapImage(New Uri("../../icon.png", UriKind.RelativeOrAbsolute))) 
RadWindowInteropHelper.SetShowInTaskbar(Me, True) 

Figure 1: The customized RadWindow

The customized RadWindow

Figure 1: The customized RadWindow's taskbar thumbnail preview

The customized RadWindow's taskbar thumbnail preview

See Also

In this article