public bool OnPressed(GlobalAction action) { switch (action) { case GlobalAction.Back: if (skinEditor?.State.Value == Visibility.Visible) { skinEditor.ToggleVisibility(); return(true); } break; case GlobalAction.ToggleSkinEditor: if (skinEditor == null) { LoadComponentAsync(skinEditor = new SkinEditor(target), AddInternal); skinEditor.State.BindValueChanged(editorVisibilityChanged); } else { skinEditor.ToggleVisibility(); } return(true); } return(false); }
public void Toggle() { if (skinEditor == null) { Show(); } else { skinEditor.ToggleVisibility(); } }