Click here to Skip to main content
15,894,337 members

Comments by Vasudevan Kannan (Top 2 by date)

Vasudevan Kannan 6-May-12 1:44am View    
The links are useful.For a more specific case ,how would you simplify this code below.Can you see the logic for setting and removing the busy indicator is repeated ?

ComponentViewModel.Instance.IsApplicationBusy = true;
ComponentViewModel.Instance.BusyMessage = "Loading...";

var task1 = Task.Factory.StartNew(() => DoTask1());
task1.ContinueWith(antecdent =>
{
ComponentViewModel.Instance.IsApplicationBusy = false;
CustomAction1();
}

Second Instance :

ComponentViewModel.Instance.IsApplicationBusy = true;
ComponentViewModel.Instance.BusyMessage = "Loading...";

var task2 = Task.Factory.StartNew(() => DoTask2());
task2.ContinueWith(antecdent =>
{
ComponentViewModel.Instance.IsApplicationBusy = false;
CustomAction2();
}
Vasudevan Kannan 14-Feb-11 18:26pm View    
Are you sure you are setting the isquantityEditable to false in code behind or in your view model ?