Home > DeveloperSection > Forums > WPF webbrowser on transparent window
Goti Bandu

Total Post:119

Points:835
Posted on    December-17-2013 12:44 AM

 WPF WPF 
Ratings:


 1 Reply(s)
 2798  View(s)
Rate this:

I have a WPF WebBrowser control in a Window.

I want to remove the default window controls so I set AllowsTransparency="True" and WindowStyle="None".

<Window x:Class="InstallerToolkit.InteractiveDemosWindow"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    Height="870" Width="1110" WindowStyle="None"  AllowsTransparency="True"  WindowStartupLocation="CenterScreen">

<Grid>

    <WebBrowser Name="WebBrowser" HorizontalAlignment="Left" Height="795" Margin="10,35,0,0" VerticalAlignment="Top" Width="1082" />   

</Grid>

This results -  not being able to see my web browser contents. If I remove the AllowsTransparency="True" then I can see by webpage but  now I have the default controls which I don't want.

How do I get around this?



Pravesh Singh

Total Post:411

Points:2881
Posted on    December-17-2013 1:25 AM

Hi Goti,

Adding ResizeMode = NoResize should get you rid of the controls.
I should mention that AllowTransparency = True can reduce performance! 
Depending on the kind of software, try avoinding it!

Don't want to miss updates? Please click the below button!

Follow MindStick