wpf busyindicator没有出现

ali*_*ce7 4 c# wpf controls busyindicator

我的窗口上有这样的wpf忙指示符:

<Grid><Controls1:BusyIndicator  x:Name="busyIndicator2" IsBusy="False" Content="Please wait....." Visibility="Hidden"/>
</Grid>
Run Code Online (Sandbox Code Playgroud)

并在按钮单击我试图设置visiblity,指标的isBusy属性为真和可见.

void button_click(object sender, RoutedEventArgs e)
{
   busyIndicator2.Visibility = System.Windows.Visibility.Visible;
   busyIndicator2.IsBusy = true;
}
Run Code Online (Sandbox Code Playgroud)

但是指标没有出现.

知道为什么吗?

Chr*_*nty 6

我总是用BusyIndi​​cator包装其他wpf内容,然后以该内容为中心显示.

<BusyIndicator...>
  <Grid>....</Grid>
</BusyIndicator>
Run Code Online (Sandbox Code Playgroud)

尝试将您的布局控件包装在BusyIndi​​cator中,看看它是否符合您的要求.