Displaying System.Windows.Controls.WebBrowser in RadWindow

4 posts, 0 answers
  1. Simon Neill
    Simon Neill avatar
    1 posts
    Member since:
    Feb 2010

    Posted 22 Feb 2010 Link to this post

    Hi I'm trying to display a System.Windows.Controls.WebBrowser in a RadWindow. The WebBrowser does not appear to render properly. The WebBrowser control is there (I can right click and display the context menu) but the page it displays is not visible? The following code snippets should demonstrate the issue...
    Create the RadWindow in response to a button click...
    <Window x:Class="TelerikForm.Window1" 
        Title="Window1" Height="300" Width="300"
        <Button Name="launchWindow" Content="launchNewWindow" Click="launchWindow_Click" /> 
    private void launchWindow_Click(object sender, RoutedEventArgs e) { 
      RadWindow testWindow = new RadWindow(); 
      testWindow.Content = new Browser(); 
    And add some content containing the WebBrowser...
    <UserControl x:Class="TelerikForm.Browser" 
        Width="600" Height="600"
        <Border Width="590" Height="590" Margin="5" BorderBrush="Black" BorderThickness="1"
          <WebBrowser Name="browser" Loaded="browser_Loaded" > 
    private void browser_Loaded(object sender, System.Windows.RoutedEventArgs e) {       
          browser.Navigate(new Uri("http://www.google.co.uk/", UriKind.RelativeOrAbsolute), nullnull""); 
    Thanks in advance..Simon...
  2. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 22 Feb 2010 Link to this post

    Hello Simon,

    The RadWindow control doesn't support WebBrowser control as it is displayed into a transparent WPF Window and the WPF Window doesn't support hosting WebBrowser control when it is in transparent mode. What I could suggest you is to use a WPF Window control to host the WebBrowser control.

    Best wishes,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 25 Jun 2013 Link to this post

    Hi Simon,

    I just want to add that there is a work-around for this limitation now - you just need to set the AllowTransparency attached property of the RadWindow control to false. Here is an example how to do this:
    var window = new RadWindow
        Content = new WebBrowser { Source = new Uri("http://www.telerik.com/") },
        Width = 700,
        Height = 500
    RadWindowInteropHelper.SetAllowTransparency(window, false);

    Miroslav Nedyalkov

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Patrick
    Patrick avatar
    55 posts
    Member since:
    Jun 2008

    Posted 24 Sep 2014 in reply to Miroslav Nedyalkov Link to this post

    Awesome! Thanks for the update. I had this same issue and now it is solved.
Back to Top