繁体   English   中英

Windows Phone 8 App中的进度栏

[英]Progress Bar in Windows Phone 8 App

当某些数据正在处理时,我想向我的应用程序添加进度条。

在XAML中:

ProgressBar x:Name="progressBar1"  Value="{Binding progressPercent}" Maximum="100" Margin="10,209,10,63" Grid.Row="5" RenderTransformOrigin="0.5,0.5">

在C#中:

private void Button_Click_1(object sender, RoutedEventArgs e)
{
    IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
    progressBar1.IsIndeterminate = true;    

    progressBar1.Value = progressPercent;

    for(int i=0;i<5;i++)
    {
        if(count[i] == 1)
        {
            t=1;
            break;
        }
    } // and the code continues

但是,当我使用断点进行检查时, IsDeterminate属性不会变为true。 谁能告诉我这是什么问题?

我看不到页面的整个xaml。 和后面的代码。 我可以检查两件事。

  1. 我将检查xaml,并确保进度条不在任何其他控件之下或不在屏幕范围内。 如我所见,进度条Grid.Row为5,top设置为209。它可能超出了屏幕范围。

  2. 可能会有另一条鳕鱼在代码文件中将中间状态设置为false。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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