Hi,
I am having a WPF window with few grids containing rows varying from 2-100. When I click on a link from a previous window, this window has to be loaded. I have used RadBusyIndicator for the entire content. And the grid population LoadData() is being done in Tasks which is called on Window Loading. So presently my UI is displayed with all the grid without any contents and maybe after 4-5 seconds, the contents are loaded.
I want to display the RadbusyIndicator when no contents are present and once the contents appear, it should disappear. Please find the below code I have implemented. But in this case, RadBusyIndicator is not displayed. Kindly help.
An alternative that works presently is to put DisplayAfter = 0, here the indicator appears though it doesn't spin and later vanish when data loads.
public void LoadData( string filePath)
{
this.IsBusy = true;
Task.Factory.StartNew(() => {
OnPopulateDataDoWork(filePath);
}).ContinueWith(t =>
{
this.IsBusy = false;
}, TaskScheduler.FromCurrentSynchronizationContext());
Thanks,
Divya