You can call the busy indicator of silver light master page from the child form in the following way..
1. Register the Message in constructor of MasterPage View Model
2. Define the function in MasterPage view Model
3. Call This Message from your Child form as follows
1. Register the Message in constructor of MasterPage View Model
public vmMasterPage() { //Your other work Messenger.Default.Register(this, "GetBusy", getBusy); }
2. Define the function in MasterPage view Model
public void getBusy(string msg) { //MainPageBusyIndicator is bool property to bind with busyindcator control on masterPage // if (msg == "Busy") { MainPageBusyIndicator = true; } else { MainPageBusyIndicator = false; } }
3. Call This Message from your Child form as follows
Messenger.Default.Send("Busy", "GetBusy");
No comments:
Post a Comment