public static void IsBusyProcess(Action action, String isBusyMessage) { BusyActionEventArgs args = new BusyActionEventArgs() { IsBusyAction = action, BusyMessage = isBusyMessage }; IsBusyChange(null, args); }
public void InitiateIsBusy(object sender, BusyActionEventArgs e) { BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += (o, ea) => { e.IsBusyAction.Invoke(); //Dispatcher.Invoke((Action)(() => e.IsBusyAction())); }; worker.RunWorkerCompleted += (o, ea) => { this.ShellBusyIndicator.IsBusy = false; }; this.ShellBusyIndicator.IsBusy = true; worker.RunWorkerAsync(); }