For Windows Phone 7 developers, I want to tell users that they do not use progressbar.ProgramRunning. A progress dialog box is displayed. You can use Popup.
Front-end
<Popup X: Name = "progresspopup" width = "300" isopen = "false" horizontalalignment = "center"
Verticalalignment = "TOP" D: layoutoverrides = "width, horizontalmargin" margin = "89,203,">
<Border borderthickness = "10" borderbrush = "black" background = "darkgray" padding = "30,30">
<Stackpanel>
<Textblock maxheight = "100" foreground = "white" fontweight = "bold" fontsize = "36" X: Name = "TXT" text = "1">
<Textblock. triggers>
<Eventtrigger routedevent = "textblock. Loaded">
<Beginstoryboard> <storyboard>
<Doubleanimation autoreverse = "true" Duration ="
From = "1.0" repeatbehavior = "forever" storyboard. targetname = "TXT" storyboard. targetproperty = "opacity" to = "0.0"/>
</Storyboard>
</Beginstoryboard>
</Eventtrigger>
</Textblock. triggers>
</Textblock>
</Stackpanel>
</Border>
</Popup>
Background
Public partial class mainpage: phoneapplicationpage
{
Storyboard _ timer = new storyboard ();
Int I = 0;
Public mainpage ()
{
Initializecomponent ();
_ Timer. Duration = timespan. frommilliseconds (10 );
_ Timer. Completed + = new eventhandler (_ timer_completed );
_ Timer. Begin ();
I = convert. toint32 (txt. Text );
}
Private void phoneapplicationpage_loaded (Object sender, routedeventargs E)
{
This. Dispatcher. begininvoke (new action () => progresspopup. isopen = true ));
}
Void _ timer_completed (Object sender, eventargs E)
{
If (I <= TXT. maxheight)
{
I ++;
This.txt. Text = I. tostring ();
_ Timer. Begin ();
Return;
}
This. Dispatcher. begininvoke (new action () =>{ progresspopup. isopen = false ;}));
}
}