Hi today i'll explain how to remove flicker effect for web browser in windows phone.
for windows phone web browser that effect will occurs while refreshing with new content when ever we use navigate method. so for that we have to use following trick to make this work fine without flickering.
when your document was loading use the below method that calls afters your document was loaded
<phone:WebBrowser x:Name="webBrowser" Visibility="Collapsed"/>
this.webBrowser.LoadCompleted += new System.Windows.Navigation.LoadCompletedEventHandler(webBrowser_LoadCompleted);
private void webBrowser_LoadCompleted(object sender, NavigationEventArgs e)
{
web.OpacityMask = null;
web.Opacity = 1;
web.Visibility = System.Windows.Visibility.Visible;
}
here this makes your browser not to flicker. we here nothing doing just making the browser collapsed and after the browser loaded we making the browser opacity visible and visibility visible, this makes hidden the browser flickering. :)
for windows phone web browser that effect will occurs while refreshing with new content when ever we use navigate method. so for that we have to use following trick to make this work fine without flickering.
when your document was loading use the below method that calls afters your document was loaded
<phone:WebBrowser x:Name="webBrowser" Visibility="Collapsed"/>
this.webBrowser.LoadCompleted += new System.Windows.Navigation.LoadCompletedEventHandler(webBrowser_LoadCompleted);
private void webBrowser_LoadCompleted(object sender, NavigationEventArgs e)
{
web.OpacityMask = null;
web.Opacity = 1;
web.Visibility = System.Windows.Visibility.Visible;
}
here this makes your browser not to flicker. we here nothing doing just making the browser collapsed and after the browser loaded we making the browser opacity visible and visibility visible, this makes hidden the browser flickering. :)
No comments:
Post a Comment