Version

Display a Label Over the Icon Area

{Warning}

In order to divide the PopupMenuTool into logical sections, you may want to use a LabelTool as a header. With the LabelDisplayStyle property, you can do just that. Setting the LabelDisplayStyle property to Header will display all labels in a menu overtop the icon area. This essentially gives you headers for various sections in a popup menu.

The following code demonstrates how to create a PopupMenuTool and set its LabelDisplayStyle property to Header, giving your popup menus a look similar to the images to the right ("Header 1" and "Header 2" are LabelTools).

standard popupmenu tool
popupmenu tool with label over the icon area when using ribbon

Default

Header

In Visual Basic:

Dim contextMenu As New Infragistics.Win.UltraWinToolbars.PopupMenuTool("ContextMenu")
contextMenu.Settings.LabelDisplayStyle = _
  Infragistics.Win.UltraWinToolbars.LabelMenuDisplayStyle.Header

In C#:

Infragistics.Win.UltraWinToolbars.PopupMenuTool contextMenu = new
  Infragistics.Win.UltraWinToolbars.PopupMenuTool("ContextMenu");
contextMenu.Settings.LabelDisplayStyle =
  Infragistics.Win.UltraWinToolbars.LabelMenuDisplayStyle.Header;