Hi
I am using BusyIndicator which is WPF extended control for my scanning application using C# and WPF. When user starts scanning operation, I want to show Please wait.... busybox with my scanning window grayed out .
Following is my code :
private
void btnStart_Click(object sender, RoutedEventArgs e)
{
ScanBusyInd.IsBusy =
true;
var bw = new BackgroundWorker();
bw.DoWork += (s, args) =>
{
Action action = delegate()
{
PerformScanning();
};
Dispatcher.Invoke(
DispatcherPriority.Background, action);
};
bw.RunWorkerCompleted += (s, args) =>
{
ScanBusyInd.IsBusy =
false;
};
bw.RunWorkerAsync();
}
Problem :-
My application is graying out the window, but its not displaying Please wait... busy box. I have followed all the steps related with dispatcher object and all. Also I tried to set visibility for busy indicator as well by ScanBusyInd.Visibility = Visibility.Visible; But its not working.
Even I have put all control assignment related code in dispatcher block for every control like below
Dispatcher.Invoke(new Action(() => pvScanImage.Image = PageSideScan.Streams[0]));
But still busy indicator is not getting displayed. same thing works in other POC application.
I am not able to understand what am I missing here ?
Screen scenario :-
My screen is having so many WPF and third party scanning viewer related controls
After clicking on start scan button, lot of process is going on, like scanning various pages, savning them, creating some text files, assigning some values to control.
Could anybody suggest, what more needs to be done here?
Quick suggestions will be really helpful and appreciated.
Thanks
Sarang