Anyone can Give code samples for how to use progressbar in windo开发者_StackOverflow中文版ws phone 7.
Jeff Wilcox, a developer at Microsoft has released a progress bar that might be useful: A high performance ProgressBar for Windows Phone
In XAML:
<ProgressBar Height="40" Name="progressBar1" Width="300" />
In code-behind:
progressBar1.Minimum = 0;
progressBar1.Maximum = 100;
progressBar1.Value = 39;
You can use the ProgressBar class to add a progress bar to your application. However, if you plan on adding an indeterminate progress bar, using ProgressBar can decrease the performance of your application. This is because the current implementation of ProgressBar runs an indeterminate progress bar on the UI thread, rather than the compositor thread.
Instead, you can use the CustomIndeterminateProgressBar sample to add an indeterminate progress bar that runs on the compositor thread for better performance. This topic describes how the sample works, and how you can use it to add an indeterminate progress bar to your application.
How to: Create a Custom Indeterminate Progress Bar
精彩评论