I’m developing simple C# application using Windows.Forms on .NET. I need some button that will show a drop-down menu with subcategories – much like ToolStripMenu, but the button, you know. I searched for it and could not found any variants.
My question is: is there any way to do this, maybe some secret button property that allows attach menu to it?
Any help will be appreciated.
You can show the ContextMenuStrip on the click event:
To make your own determination whether to show the menu above or below the button, you can try using this code, which measures the menu and determines whether or not it would be partially offscreen: