繁忙的指示器未显示在wpf窗口中

时间:2011-06-09 16:43:50

标签: c# wpf busyindicator

  

可能重复:
  wpf busyindicator not showing up

我尝试在这样的窗口中使用忙碌指示器:

   <extToolkit:BusyIndicator Width="160" Height="100"
               x:Name="busyIndicator" Visibility="Hidden"  />

当用户选择要导入的某些文件然后我对这些文件进行一些解析时,我试图调用它。

设置这两个属性:

importProgressBar.busyIndicator.IsBusy = true;
importProgressBar.busyIndicator.Visibility = Visibility.Visible;
在窗口弹出之前

每当文件解析完成时,我都会调用委托函数。在里面,我用繁忙的指示器调用窗口。

private void ShowIndicator(ProgressReport progressReport)
{
    window.Show();

    if (progressReport.OverallProgress.Completed)
    {
        window.Close();
    }
}

因此你可以在这个函数里面看到我已经完成了属性,在完成时会自动关闭窗口,但窗口显示没有忙碌指示。

有人可以指出为什么繁忙的指标没有显示在窗口中吗?

1 个答案:

答案 0 :(得分:1)