New Open-Source Control for Compact Framework: Popup Menu

A recent question on StackOverflow got me sidetracked into the context menus for Windows CE/Windows Mobile.  The question is pretty simple – when you create a ContextMenu, it automatically “selects” the first item, and the OP wanted to know how to undo that selection.  I spent a few hours screwing around with reflection and trying to get at the handle for the menu items so I could P/Invoke and unselect the item and only ended up failing (though I did post the meat of my work in my original answer).

After doing that work it occurred to me that we (OpenNETCF) used to have a PopupMenu commercial control that we long ago pulled from our catalog.  Well I looked on our old source control server and sure enough, it was there.  Since it was doing no one any good sitting in a bit bucket, I added it to our published open-source control set over on Codeplex.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s