How can I hide a Gtk# window that I created in MonoDevelop? I tried the following but it doesn't work:
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build();
this.HideAll();
this.Visible = false;
}
Solution
Calling HideAll()
outside the constructor, as tomlog suggested, works. If you want to do some work before showing the window you can
- Add an event handler to
Window.Shown
before callingBuild()
- Do the work before calling
Build()
(probably the better alternative in most cases)