A quick lesson in usability…

Want to make your .Net app that much usable? Don’t like a crowded UI? Consider adding a context menu.

In Visual Studio, in the forms designer, add a ContextMenuStrip (click the ContextMenuStrip in the toolbar, then click somewhere on your form). In the bottom of the form designer, click the newly added ContextMenuStrip (named contextMenuStrip1, or something like that by default).

Click the small black arrow at the top of it, then click Edit Items. (It looks somThis brings up a separate dialog that will allow you to add ContextMenuStripItems to the ContextMenuStrip. Once you’ve added your menu items, close the dialog, select the control you want the context menu to appear on, and assign it’s ContextMenuStrip property to the newly created ContextMenuStrip. Now, when you launch the application, right click on the control and your newly created context menu should pop up.

Just remember, hiding functionality in a context menu is a double edge sword. It can be used to clean up your user interface, but it can also be confusing for users who are not familiar with your program. The same functionality should also often be available through standard menu items, when appropriate.


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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