Click here to Skip to main content
15,909,030 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a webbrowser control with some html inside it, now when i open a silverlight child window,
the silverlight child window goes behind the webbrowser control. This seems to really distort the UI.
Any solution for this.
Posted
Comments
Sergey Alexandrovich Kryukov 1-Aug-11 9:41am    
Not enough information. Distort? How?
--SA

1 solution

The WebBrowser control is not a silverlight object and sits on top of all content. You need to flip Visibility between the WebBrowser control and a rectangle with the fill set to WebBrowserBrush when the child window is visible and back when it's not. Something like:

HTML
<webbrowser x:name="browserControl" source="{Binding URL}" xmlns:x="#unknown" />
<rectangle x:name="browserControlRect" xmlns:x="#unknown">
    <rectangle.fill>
        <webbrowserbrush sourcename="browserControl" />
    </rectangle.fill>
</rectangle>


Then either VSM, Behaviours, or code to do the toggling.
 
Share this answer
 
Comments
Graeme_Grant 3-Aug-11 20:01pm    
not sure why but the codeblock was pushed to lowercase.... :/

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