Forum Xamarin.Mac


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

PopUpMenu disables other control when is open

mall1312mall1312 Member ✭✭
edited April 2020 in Xamarin.Mac

I'm facing an issue, when NSMenu.PopUpMenu is called then it disables my NSTextField even if I don't select any item from NSMenu.
My NSMenu belongs to another custom control to show items as PopUpButton(ComoboBox).

Here is part of my code:
CGPoint loc = new CGPoint(0f, 0f);
var result = PopUpMenu.PopUpMenu(PopUpMenu.Items[0], loc, this); //From here my NSTextField changes to disabled and I cannot be edited

Here is my NSTextField before open NSMenu:

After NSMenu is open:

THESE CONTROLS ARE SHOWN IN A DIALOG WINDOW. I have the same controls in other window(no dialog) and they work correctly.
Dialog uses storyboard and viewcontroller to be loaded in the window.


  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    This sounds like a Cocoa specific issues. I strongly suspect that if you reproduced your situation in ObjC it would act the same way.

    My guess is that PopUpMenu is running a message pump of it's own, and that disables other controls.

  • mall1312mall1312 Member ✭✭

    Also, a similar issue:
    I have a Content View inside a StackView when ContentView is collapsed and then expanded, I click my popup button but it cannot show the NSMenu. I have to collapse and expand again to be able to show the menu.
    ContentView is linked to a ViewController(StorybBoard) which contains popup button.

Sign In or Register to comment.