Intersoft WebDesktop Documentation
WebMenuItem Class
Members  Example  See Also  Send Feedback
ISNet.WebUI.WebDesktop Namespace : WebMenuItem Class


Glossary Item Box

Command menu item collection in WebMenuBar and WebContextMenu.

Object Model

WebMenuItem Class

Syntax

Visual Basic (Declaration) 
Public Class WebMenuItem 
   Inherits ISNet.WebUI.NamedObjectBase
   Implements ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject, IWebMenu 
Visual Basic (Usage)Copy Code
Dim instance As WebMenuItem
C# 
public class WebMenuItem : ISNet.WebUI.NamedObjectBase, ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject, IWebMenu  

Remarks

WebMenu provides five MenuItem types. They are Normal, Radio, CheckBox, Separator, and Custom.

Example

The following codes show you how to enable and disable menu items programmatically. For more details please read the Enabling and Disabling MenuItem on See Also section.
C#Copy Code
protected void Button1_Click(object sender, EventArgs e)
{
    WebMenuBar1.Menus[0].Items.GetNamedItem("mnuSave").Enabled = false;
    WebMenuBar1.Menus[0].Items.GetNamedItem("mnuSaveAll").Enabled = false;
    Label1.Text = "MenuItem Save and SaveAll have been disabled";
}
protected void Button2_Click(object sender, EventArgs e)
{
    WebMenuBar1.Menus[0].Items.GetNamedItem("mnuSave").Enabled = true;
    WebMenuBar1.Menus[0].Items.GetNamedItem("mnuSaveAll").Enabled = true;
    Label1.Text = "MenuItem Save and SaveAll have been enabled";
}

Inheritance Hierarchy

System.Object
   ISNet.WebUI.WebUIBaseClass
      ISNet.WebUI.NamedObjectBase
         ISNet.WebUI.WebDesktop.WebMenuItem

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.