Hi , I am trying to use WPF Extended Toolkit like this
<extToolkit:BusyIndicator x:Name="bsyind" Grid.Row="2" IsBusy="False" DisplayAfter="0">
<ContentControl Grid.Row="2" x:Name="myUserControl" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" VerticalContentAlignment="Center">
Now in code behind I 'new' my User Control and set it as content of myUserControl. Now that Usercontrol takes some time to load, as it adjust itself according to provided information , so what I want is that when user clicks a button , I show a busy indicator
and when UserControl is loaded and set as contentcontrol i hide my busy indocator and I am trying to do something like this in my button click event handler
Thread t = new Thread(new ThreadStart(
Dispatcher.BeginInvoke(DispatcherPriority.DataBind, new Action<BusyIndicator>(SetValue), bsyind);
MyUC suc = new MyUC();
suc.XCtrl_Clicked += new ..........
this.myUserControl.Content = suc;
private static void SetValue(BusyIndicator pbsyind)
pbsyind.IsBusy = true; ;
But its not working , I need reference of MYUC control on my main UI thread as I need to perform other operations using this reference.
So please help me here how to show busy indicator in this scenario .
EDIT: Busyindicator actually shows up but when MYUC control is loaded(as main UI thread is blocked till then), whereas I want to show it when user clicks on button and hide when control is loaded.