Host WebBrowser in RadWindow

A common scenario that you might want to achieve is hosting a WebBrowser control in a RadWindow. However, by default the RadWindow does not support this, because it is displayed into a transparent WPF Window and the WPF Window doesn't support hosting a WebBrowser control when it is in transparent mode.

Setting the Transparancy of the RadWindow

In order to achieve the requirement described above, you can utilize the RadWindowInteropHelper class in order to set the AllowTransparency attached property on the RadWindow. Example 1 demonstrates this approach.

Example 1: Hosting a WebBrowser in RadWindow

var window = new RadWindow 
{ 
    Content = new WebBrowser { Source = new Uri("http://www.telerik.com/") }, 
    Width = 700, 
    Height = 500 
}; 
RadWindowInteropHelper.SetAllowTransparency(window, false); 
window.Show(); 
Dim window = New RadWindow With { 
    .Content = New WebBrowser With {.Source = New Uri("http://www.telerik.com/")}, 
    .Width = 700, 
    .Height = 500 
} 
RadWindowInteropHelper.SetAllowTransparency(window, False) 
window.Show() 

Figure 1: Result from Example 1 in the Office2016 theme

WebBrowser in RadWindow

See Also

In this article
Not finding the help you need? Improve this article