public void SwitchTo(string key)
{
var requestedControl = _controls[key];
if (requestedControl == _activeControl)
return;
_container.Sync(() =>
{
if (_activeControl != null)
{
_activeControl.Visible = false;
}
requestedControl.BringToFront();
requestedControl.Visible = true;
_activeControl = requestedControl;
});
}
public void ShowInbox(ImmutableInbox inbox) { this.Sync(() => LoadInbox(inbox)); _region.SwitchTo("inbox"); }