c# - How to show progressbar until WP8 WebBrowser control loaded parameter? -



c# - How to show progressbar until WP8 WebBrowser control loaded parameter? -

i have webbrowser command , want show url parameter on control. until webbrower loaded page, need show progressbar or animation.

please help me, here's have:

public partial class brw : phoneapplicationpage { public brw() { initializecomponent(); } protected override void onnavigatedto(system.windows.navigation.navigationeventargs e) { base.onnavigatedto(e); string parametervalue = navigationcontext.querystring["parameter"]; system.uri uri = new system.uri(parametervalue); webbrowser.source = uri; } private void webbrowser_navigating_1(object sender, microsoft.phone.controls.navigatingeventargs e) { progressbar.visibility = visibility.visible; } private void webbrowser_navigated_1(object sender, system.windows.navigation.navigationeventargs e) { progressbar.visibility = visibility.collapsed; } private void phoneapplicationpage_loaded_1(object sender, system.windows.routedeventargs e) { }

}

thank

this can achieved using loadcompleted property.

xaml:

<progressbar x:name="progressbar" isindeterminate="true"/> <phone:webbrowser x:name="webbrw" isscriptenabled="true" loadcompleted="yesloaded"/>

.cs:

private void yesloaded(object sender, navigationeventargs e) { this.progressbar.visibility = visibility.collapsed; this.progressbar.isindeterminate = false; }

have @ this sample.

hope helps!

c# windows-phone-8

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -