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


Glossary Item Box

WebContextMenu offers a MenuBar control functionality, an integration with DesktopManager bind with Server-side controls capability and completed with powerful Designer which will help the process of design time in a more convenient way.

Object Model

WebContextMenu Class

Syntax

Visual Basic (Declaration) 
Public Class WebContextMenu 
   Inherits ISNet.WebUI.ISNetControl
   Implements ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ITemplateSync, IWebMenuIWebMenuControl 
Visual Basic (Usage)Copy Code
Dim instance As WebContextMenu
C# 
public class WebContextMenu : ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ITemplateSync, IWebMenuIWebMenuControl  

Remarks

WebContextMenu is designed with a professional architecture and object model as well as specialized user interface for each elements. Therefore, WebContextMenu provides a flexibility to create a Windows-like ContextMenu object which is rich in styles, functions, and behaviors.

WebContextMenu can be integrated with DesktopManager. When integrated, WebContextMenu will refer to the DesktopManager instance and use the Styles defined in DesktopManager automatically. The benefits of this integration are faster page performance with reduced output and maintain the consistency of "look & feel" in entire application effortlessly.

WebContextMenu provides you the easiest way on performing server-side controls integration. You just simply set the ControlId property to the server control's Id, and the designer will do the integration part automatically without any extensive coding required.

Example

The following codes show you how to display WebContextMenu programmatically from server side.
C#Copy Code
protected void Page_Load(object sender, EventArgs e)
{
    WebContextMenu wcm = new WebContextMenu();
    wcm.ControlId = "Button1";
    
    WebMenuItem  wmi1 = new WebMenuItem();
    wmi1.Name = "mnuContextMenu1";
    wmi1.Text = "ContextMenu1";
    wcm.Items.Add(wmi1);
    
    WebMenuItem wmi2 = new WebMenuItem();
    wmi2.Name = "mnuContextMenu2";
    wmi2.Text = "ContextMenu2";
    wcm.Items.Add(wmi2);
    
    HtmlForm frm = (HtmlForm)Page.FindControl("Form1");
    frm.Controls.Add(wcm);
}

Inheritance Hierarchy

System.Object
   System.Web.UI.Control
      System.Web.UI.WebControls.WebControl
         ISNet.WebUI.ISNetControl
            ISNet.WebUI.WebDesktop.WebContextMenu

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.