Can I set focus back to a modal screen without calling BeginModal?
I have a home screen (Application::aoHomeScreen) which is modal but in the background after creating new screens in front of it.
I call RestackBack and EndModal on the current screen and the modal home screen is displayed. However it's focus property is not set.
I have found that I can get back focus by calling BeginModal, but this causes an exception unless I call EndModal first. The code below works, but is there a more correct way of doing this?
var Core::Root rootObject = GetRoot();
rootObject.RestackBack (this); // put current screen to the background
rootObject.EndModal (this); // endmodal on current screen
// beginmodal throws exception if the view is already modal
rootObject.EndModal (Application::aoHomeScreen);
rootObject.BeginModal (Application::aoHomeScreen);