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


Glossary Item Box

WebMenu is the core runtime system that builds up WebMenuBar and WebContextMenu control.

Object Model

WebMenu Class

Syntax

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

Remarks

Using WebMenu you can easily create professional Office® 2003-like menu system. You can use WebMenuBar control to quickly build a professional Office-like, dockable menu user interface to your web application. The MenuBar is modeled after the popular desktop's Menu system, and provides unique functions in addition to the regular features of a Menu.

The hybrid menu system enables tight integration with various WebDesktop.NET's members that requires menu functions. Hybrid menu system is the same core foundation that builds WebMenuBar and WebContextMenu control. Therefore, developers will get consistent object model and API across products that implement the menu system.

WebMenu has the ability to simulate latest visual styles which are highly configurable through property settings. Moreover, WebMenu implements every single details of a Desktop's Menu, from every keystroke, mouse events to advanced behaviors. The result is a great benefit for end users who have been familiar with desktop applications, such as navigation of menu items through keyboard arrow keys and navigation between menus and sub menus.

Example

The following codes show you how to create WebMenu structure programmatically.
C#Copy Code
protected void Page_Load(object sender, EventArgs e)
    {
        body.Style.Add("overflow", "hidden");

        // programmatically create command and items
        MenuCommand cmdFile = new MenuCommand();
        cmdFile.Name = "cmdFile";
        cmdFile.AccessKey = "F";
        cmdFile.Text = "File";

        WebMenuItem itmNew = new WebMenuItem();
        itmNew.Name = "itmNew";
        itmNew.Text = "New";

        WebMenuItem itmNewWindow = new WebMenuItem();
        itmNewWindow.Name = "itmNewWindow";
        itmNewWindow.Text = "New Window";

        WebMenuItem itmNewTab = new WebMenuItem();
        itmNewTab.Name = "itmNewTab";
        itmNewTab.Text = "New Tab";

        WebMenuItem separator = new WebMenuItem();
        separator.Type = MenuItemType.Separator;

        itmNew.Items.Add(itmNewTab);
        cmdFile.Items.Add(itmNew);
        cmdFile.Items.Add(new WebMenuItem("Open"));
        cmdFile.Items.Add(new WebMenuItem("Save", "mnuSave", "../Images/Save.gif"));
        cmdFile.Items.Add(separator);
        cmdFile.Items.Add(new WebMenuItem("Exit", "mnuExit", "", "e"));
        WebMenuBar1.Menus.Add(cmdFile);
    }

Inheritance Hierarchy

System.Object
   ISNet.WebUI.WebUIBaseClass
      ISNet.WebUI.WebDesktop.WebMenu
         ISNet.WebUI.WebDesktop.WebMenuRoot

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.