I am trying to make a WebBrowser control on my Windows 7 Phone app transparent, so it can have the same theme as the rest of the app, but I have had no success with anything
Code-solution:
private void SetHtml(WebBrowser browser, string body)
{
string style = "";
string html = "" + style + "" + body + "";
Color phoneBackground = (Color)Application.Current.Resources["PhoneBackgroundColor"];
browser.Background = new SolidColorBrush(phoneBackground);
browser.Opacity = 0;
browser.NavigateToString(html);
browser.LoadCompleted += browser_LoadCompleted;
}
void browser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
_browser.OpacityMask = null;
_browser.Opacity = 1;
}