0

Is there a way to have a Xamarin.Mac app hide its window?

In Main.storyboard I see the <window> element has attribute visibleAtLaunch=“NO” set, so maybe there is some code making it visible in the first place I could suppress.

Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130
  • https://medium.com/@venj/hide-window-instead-of-close-it-when-clicks-the-close-button-25768e41ee2d? – Lex Li Jan 09 '19 at 18:21

1 Answers1

1

I was able to add this to the default ViewController:

        public override void ViewDidAppear()
        {
            base.ViewDidAppear();

            this.View.Window.Close();
        }
Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130