简体   繁体   中英

Progress Bar while fetching data from server in WP7

在wp7中从数据库中获取数据时如何显示进度条?

When you are fetching data, set a flag ( bool ) IsLoading to true . When it's done, set the same flag to false . Implement the onPropertyChanged -event whenever this is changed.

To show a progress bar, add the following to your XAML :

<toolkit:PerformanceProgressBar 
       x:Name="performanceProgressBar" 
         IsIndeterminate="true" 
         Visibility="{Binding IsLoading, Converter={StaticResource VisibilityConverter}}" />

Then you implement a VisibilityConverter and to make your bool value into a Visibility -enum.

There's tons of information about this on the web, so I'm not going to rewrite what others taught me. Have a look at these links:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM