Menu
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Represents the base functionality for all menus.
- C#
- VB.NET
public class Menu : BindableComponent, ICloneable
Public Class Menu
Inherits BindableComponent
Implements ICloneable
Properties
AccessibleDescription
String: Returns or sets the description that will be reported to accessibility client applications. It is assigned to the "alt" attribute of the browser element. (Default: null)
AccessibleName
String: Returns or sets the name of the control for use by accessibility client applications. It is assigned to the "name" attribute of the browser element. (Default: null)
IsParent
Boolean: Returns a value indicating whether this menu contains any menu items. This property is read-only.
ItemCount
Int32: Returns the number of child menu items without forcing the creation of the collection.
MdiListItem
MenuItem: Returns the child menu item that is used to display a list of multiple document interface (MDI) child forms.
MenuItems
MenuItemCollection: Returns the collection of MenuItem objects associated with the menu.
Name
String: Returns or sets the name of the Menu.
Tag
Object: Returns or sets user-defined data associated with the control. (Default: null)
Methods
CloneMenu(source)
Copies the Menu that is passed as a parameter to the current Menu.
| Parameter | Type | Description |
|---|---|---|
| source | Menu | The Menu to copy. |
Dispose(disposing)
Disposes of the resources, other than memory, used by the Menu.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | true when this method is called by the application rather than a finalizer. |
FindMergePosition(mergeOrder)
Returns the position at which a menu item should be inserted into the menu.
| Parameter | Type | Description |
|---|---|---|
| mergeOrder | Int32 | The merge order position for the menu item to be merged. |
Returns: Int32. The position at which a menu item should be inserted into the menu.
GetContextMenu()
Returns the ContextMenu that contains this menu.
Returns: ContextMenu. The ContextMenu that contains this menu. The default is null.
GetMainMenu()
Returns the MainMenu that contains this menu.
Returns: MainMenu. The MainMenu that contains this menu.
GetMenuBar()
Returns the MenuBar that contains this menu.
Returns: MenuBar. The MenuBar that contains this menu.
MergeMenu(source)
Merges the MenuItem objects of one menu with the current menu.
| Parameter | Type | Description |
|---|---|---|
| source | Menu | The Menu whose menu items are merged with the menu items of the current menu. |
Throws:
- ArgumentException It was attempted to merge the menu with itself.
OnAddReferences(items)
Adds references components to the list. Referenced components can be added individually or as a reference to a collection.
| Parameter | Type | Description |
|---|---|---|
| items | IList | Container for the referenced components or collections. |
OnBindingContextChanged(e)
Fires the BindingContextChanged event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | An EventArgs that contains the event data. |
OnMenuItemAdded(e)
Fires the MenuItemAdded event.
| Parameter | Type | Description |
|---|---|---|
| e | MenuItemEventArgs | A MenuItemEventArgs that contains the event data. |
OnMenuItemClicked(e)
Fired the MenuItemClicked event.
| Parameter | Type | Description |
|---|---|---|
| e | MenuItemEventArgs | A MenuItemEventArgs that contains the event data. |
OnMenuItemRemoved(e)
Fires the MenuItemRemoved event.
| Parameter | Type | Description |
|---|---|---|
| e | MenuItemEventArgs | A MenuItemEventArgs that contains the event data. |
OnWebRender(config)
Renders the client component.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Dynamic configuration object. |
ValidateActiveControl()
Validates the current control.
Returns: Boolean. true if the active control is validated.
Events
MenuItemAdded
MenuItemEventHandler Fired when a new menu item is added to the MenuItemCollection.
MenuItemClicked
MenuItemEventHandler Fired when a menu item is clicked.
MenuItemRemoved
MenuItemEventHandler Fired when a menu item is removed from the MenuItemCollection.
Inherited By
| Name | Description |
|---|---|
| CheckedMenuItem | Represents an individual menu item that is displayed within a MainMenu or ContextMenu and always shows a checkbox next to the label. |
| ContextMenu | Represents a context menu associated to a Control. |
| LinkMenuItem | Represents an individual menu item that is displayed within a MainMenu or ContextMenu rendered using the <a> link element to let the browser process the specified HRef URL. |
| MainMenu | Represents the main menu in a Form. |
| MenuItem | Represents an individual item that is displayed within a MainMenu or ContextMenu. |
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IBindableComponent | Bindable components implement this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |