WebBrowser control

Jan 21, 2015 at 11:20 PM
This one is really strange, using the xaml below works OK, but if I change the Window class to extra:Window, the webbrowser control is no longer visible.

It looks like this is also happening in the sample project. (Framework.UI.TestHarness)

The WebBrowserView is supposed to navigate to www.bing.com, but if run the sample project in debug mode, the control is not visible.
<Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        WindowStartupLocation="CenterScreen"
        xmlns:extra="http://schemas.extra.com/ui" 
        Title="MainWindow" Height="600" Width="1000">
    <WebBrowser Source="http://www.google.com" />
</Window>
Coordinator
Jan 23, 2015 at 9:28 AM
This is a problem in WPF itself as indicated in this StackOverflow article. The workaround is to set the following attribute on any window where you want to use a WebBrowser.
<extra:Window ...Omitted Code... AllowsTransparency="False">
The downside is that the window will no longer have a nice drop shadow but will fall back to Windows default drop shadow.
Marked as answer by jbooth on 1/23/2015 at 7:27 AM