Click here to Skip to main content
16,017,922 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
I'm developing an application which have to connect to internet, for this, i'm using built-in Browser control of WPF. To meet the theme of overall application, i modified the interface of the browser window also, but when i run, although the site opens in WPF Browser control, but it not appears.
XML
<window x:class="SkltnApplication3.Browser" xmlns:x="#unknown">
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Browser" Height="600" Width="800" Background="Transparent" AllowsTransparency="True" WindowStyle="None" Loaded="Window_Loaded_1" >

XML
    <Grid>
        <Border BorderThickness="0" Margin="10" CornerRadius="15" Background="Silver">
            <Border.BitmapEffect>
                <DropShadowBitmapEffect />
            </Border.BitmapEffect>
            <TextBox TextWrapping="Wrap" Name="tbPin" Margin="20,542,294,10"/>
            
        </Border>
        <WebBrowser Name="browserControl" Margin="25,52,25,0" Height="488" VerticalAlignment="Top" Focusable="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True" />
        <Button Margin="500,552,160,20" Content="Send" Name="btnSend"/>
        <Button Margin="650,552,25,20" Content="Refresh" Name="btnRefresh" Click="btnRefresh_Click"/>
        <Label Margin="25,25,65,548" Content="www.twitter.com" Name="lblURL" />
        <Button Margin="754,10,10,567" Name="btnExit" Content="X" Background="#FFB55050" FontWeight="ExtraBold" TextOptions.TextHintingMode="Animated" Click="btnExit_Click">
            <Button.Resources>
                <Style TargetType="{x:Type Border}">
                    <Setter Property="CornerRadius" Value="0, 15, 0, 0"></Setter>
                </Style>
            </Button.Resources>
        </Button>
    </Grid>
</Window>


The problem is in this XAML, when I remove
XML
AllowsTransparency="True" WindowStyle="None"
, the browser appears. Kindly help me, is there a way to display it to meet my current interface, or i have to disable trasperency and windowStyle?
here is the image
Posted
Updated 1-Apr-13 23:43pm
v8
Comments
Naz_Firdouse 1-Apr-13 4:13am    
please check this
http://www.codeproject.com/Questions/217236/WPF-WebBrowser-Problem-if-AllowsTransparencyequals
Raza_theraaz 1-Apr-13 4:21am    
thanks @Naz_Firdouse, i checked the link, it helped a lot.. Simply i'm going to turn off transparency
Sergey Alexandrovich Kryukov 1-Apr-13 14:51pm    
WPF? Please tag it by using "Improve question".
—SA
Sergey Alexandrovich Kryukov 1-Apr-13 14:54pm    
You don't show valid fragment of XAML. Where in the code your "AllowsTransparency" is? Please show it correctly, all together.
—SA
Raza_theraaz 2-Apr-13 6:15am    
I also searched for a wpf window inside another, and a form inside a window, but none of these helped.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900