NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MenuItem.Break

Gets or sets a value indicating whether the item is placed on a new line (for a menu item added to a TBD object) or in a new column (for a submenu or menu displayed in a TBD).

[Visual Basic]
Public Property Break As Boolean
[C#]
public bool Break {get; set;}
[C++]
public: __property bool get_Break();
public: __property void set_Break(bool);
[JScript]
public function get Break() : Boolean;
public function set Break(Boolean);

Property Value

true to place the menu item on a new line or in a new column; false to leave the menu item in its default placement. The default is false.

Remarks

You can use the TBD property to create a menu where each menu is placed next to each other horizontally instead of in a vertical list. You can also use this property to create a menu bar that contians multiple rows of top-level menu items.

Example [Visual Basic]

The following example creates a menu with two top-level menu items on the top row and one menu item on the bottom row.

[Visual Basic]

Public Sub CreateMyMenus()
   ' Create three top-level menu items.
   Dim MenuItem1 as MenuItem
   Dim MenuItem2 as MenuItem
   Dim MenuItem3 as MenuItem
   ' Intialize the menu items with captions.
   Set MenuItem1 = New MenuItem("File")
   Set MenuItem2 = New MenuItem("Options")
   Set MenuItem3 = New MenuItem("Edit")
   ' Place the "Edit" menu on a new line in the menu bar.
   MenuItem3.Break = True
End Sub

See Also

MenuItem Class | MenuItem Members | System.WinForms Namespace | BarBreak