Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public void Toggle()
 {
     if (skinEditor == null)
     {
         Show();
     }
     else
     {
         skinEditor.ToggleVisibility();
     }
 }