This is a migrated thread and some comments may be shown as answers.

WebBrowser in RadWindow content "white"

3 Answers 229 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dario Concilio
Top achievements
Rank 2
Dario Concilio asked on 20 Sep 2016, 12:49 PM

Hi to all,

I created a RadWindow that contains WebBrowser control.

Simply, I execute Navigate method in Loaded event of RadWindow

It navigates to local url http://mylocalserver:8090/blablabla

When I open the window it appers empy, but if view HTML source is full, moreover, if I try to printer preview appers all content of webpage.

Are there problems between RadWindow control and WebBrowser?

PS: I tryed to exec InvalidateLayout method of RadWindow, but without resolve.

 

<telerik:RadWindow x:Class="Brema.Client.Helpers.BlogViewer"
        Header="Aiuto in linea" Height="640" Width="480" WindowStartupLocation="CenterScreen" Style="{StaticResource RadWindowStyle}">
    <Grid>
        <WebBrowser x:Name="MainWebBrowser" />
    </Grid>
</telerik:RadWindow>

3 Answers, 1 is accepted

Sort by
0
Dario Concilio
Top achievements
Rank 2
answered on 20 Sep 2016, 01:12 PM

I tryed using Window control standard, in this way it's OK!

Then I think that I have to "something" about RadWindow.......

1
Accepted
Polya
Telerik team
answered on 21 Sep 2016, 02:24 PM
Hello Dario,

The RadWindow control doesn't support WebBrowser control out of the box because it is displayed into a transparent WPF Window and the WPF Window doesn't support hosting WebBrowser control when it is in transparent mode.

That said, in order to allow hosting a WebBrowser in a RadWindow we should change its transparency.
We can do that by setting the AllowTransparency attached property of the RadWindow control to false:

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

Regards,
Polya
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dario Concilio
Top achievements
Rank 2
answered on 21 Sep 2016, 03:10 PM

Ok it's clear!

It's works.

Thank you.

Tags
Window
Asked by
Dario Concilio
Top achievements
Rank 2
Answers by
Dario Concilio
Top achievements
Rank 2
Polya
Telerik team
Share this question
or