0

我在我的应用程序中使用性能进度条。我正在做的是在开始一些冗长的操作并在操作完成时折叠它之前使进度条可见性可见。但在开始该操作之前它是不可见的。这是我的代码

  ucSearch.prograssBarCanvas.Visibility = System.Windows.Visibility.Visible;
        var obj = wb1.InvokeScript("SearchText", ucSearch.txtSearch.Text.Trim());
        var result = JsonConvert.DeserializeObject<List<BookChapter>>(obj.ToString());
        if (result.Count == 0)
        {
            ucSearch.txtBlMessage.Visibility = System.Windows.Visibility.Visible;
            ucSearch.lstBxResults.Visibility = System.Windows.Visibility.Collapsed;
        }
        else
        {
            ucSearch.txtBlMessage.Visibility = System.Windows.Visibility.Collapsed;
            ucSearch.lstBxResults.Visibility = System.Windows.Visibility.Visible;
        }

        ucSearch.lstBxResults.DataContext = null;
        ucSearch.lstBxResults.DataContext = result;
        ucSearch.prograssBarCanvas.Visibility = System.Windows.Visibility.Collapsed;

我想问为什么看不到??

4

1 回答 1

2

确保进度条的IsEnabled和属性为。IsIndeterminatetrue

于 2013-04-15T14:53:10.960 回答