I've got a status menu on a tray icon application with Xamarin Mac. There is no window shown by setting Application is agent (UIElement) to 1. A login window must only be shown after a menuItem is clicked. (which is connected using a action.)
The following code initialized a new MainWindowController after a button is clicked. This action is called because a breakpoint is hit, yet no window is shown.
partial void OpenLoginWindow(NSMenuItem sender)
{
var loginController = new MainWindowController();
loginController.Window.MakeKeyAndOrderFront(this);
loginController.ShowWindow(this);
}
When I set Application is agent (UIElement) back to 0. The window gets shown when the dock icon is clicked. But when the login menu item is clicked, the window are initialized, but it is not brought to the front.
The Main nib file name in Info.plist is set to MainMenu which is not the file for the window.