Link to home
Start Free TrialLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

BusyIndicator

How to apply BusyIndicator? My code are as follows;

        private void btnClick_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            busyIndicator.IsBusy = true;
           
            ThreadPool.QueueUserWorkItem((state) =>
            {
                Thread.Sleep(3 * 1000);
               
                Dispatcher.BeginInvoke(() => busyIndicator.IsBusy = false);
                SearchText.Focus();
            });
        }

I wish to apply while loading this data;
        this.dataGrid1.ItemsSource = _iContext.MyBalances;
        _iContext.Load(_iContext.GetMyBalancesAccntQuery());
 
The LoadingRow="LoadFund" of dataGrid1 where the code as follows;

        private void LoadFund(object sender, DataGridRowEventArgs e)
        {
            double x1, x2;
            var c = (MyBalance)e.Row.DataContext;
            x1 = c.A_In; x2 = c.A_Out;
            c.Balance =  x3 + x1 - x2;

            x3 =  x3 + x1 - x2;
        }
SOLUTION
Avatar of Kalpesh Chhatrala
Kalpesh Chhatrala
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Whing Dela Cruz

ASKER

Hi all! Sorry for the late response. I've been in a long vacation. I may now trying all suggested answer given above. Thanks!
Thanks!