大家好,我想Busy Indicator
在我的项目中显示一个。我正在使用后台工作线程,但问题是忙碌指示器没有显示在屏幕上我不知道是什么。代码是:
XAML 是:
<xctk:BusyIndicator Width="200" HorizontalAlignment="Center"
BusyContent="Please wait while the Access controller is configuring "
IsBusy="{Binding IsBusy}">
</xctk:BusyIndicator>
C#代码是:
BackgroundWorker _worker = new BackgroundWorker();
{
_worker.DoWork += (o, ea) =>
{
IsBusy = true;
DiscoverConnectedDevices();
};
_worker.RunWorkerCompleted += (o, ea) =>
{
IsDiscoverButtonEnable = true;
IsBusy = false;
Mouse.OverrideCursor = null;
CommandManager.InvalidateRequerySuggested();
};
ipmac = new ObservableCollection<IpMacAddressClass>();
}
public bool IsBusy
{
get
{
return _isBusy;
}
set
{
if(value!=_isBusy)
{
IsBusy = value;
OnPropertyChanged("IsBusy");
}
}
}