I am using wpf busy indicator and setting its Isbusy
property from viewModel. Aftersetting Isbusy
property I want to filter my ICollectionview
and push it on UI. This Filter
operation I have put in
IsBusy = true;
await Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background,
new System.Action(() =>
{
this.MyCollectionView.Filter = item =>
{
Iitem IdName = item as Iitem;
return Regex.IsMatch(IdName.Name, SearchText, RegexOptions.IgnoreCase);
};
}));
Workaround: If I put Task.Delay(200).Wait();
after setting IsBusy
, busy indicator will be displayed for some cases.
** indicate in WPF? – ViVi May 19 '16 at 14:43