Frank Schwieterman
Frank Schwieterman

Reputation: 24480

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

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.

Upvotes: 0

Views: 288

Answers (1)

Frank Schwieterman
Frank Schwieterman

Reputation: 24480

I was able to add this to the default ViewController:

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

            this.View.Window.Close();
        }

Upvotes: 1

Related Questions