c# - Not able to run BusyIndicator with BackgroundWorker in Wpf -


i have 2 windows. mainwindow , window busyindicator. i'm using backgroundworker , dispatcher work (calculation , ui) in main window, while want show busyindicator. window shows without busyindicator.

        busyindicator_window busy = new busyindicator_window();         busy.show();           backgroundworker worker = new backgroundworker();          worker.dowork += (o, ea) =>         {              dispatcher.invoke((action)(() =>                 {                     plot.plot_mv.startanke(selectedfilepath, lw);                  }));         };          worker.runworkercompleted += (o, ea) =>         {             busy.busyindicator.isbusy = false;         };          busy.busyindicator.isbusy = true;         worker.runworkerasync();  

is there got wrong? thanks

a background worker delegates ui thread pretty useless. work want do:

worker.dowork += (o, ea) => {   plot.plot_mv.startanke(selectedfilepath, lw); }; 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

android - CoordinatorLayout, FAB and container layout conflict -