Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.UIControls.v4.4 Assembly / Xceed.Chart.UIControls Namespace / OwnerDrawMenuItem Class
Members Example


In This Topic
    OwnerDrawMenuItem Class
    In This Topic
    Represents a class that inherits from the System.Windows.Forms.MenuItem class and provides custom drawing, which is dependent on the current OS appearance settings.
    Object Model
    OwnerDrawMenuItem Class
    Syntax
    'Declaration
     
    <ToolboxItemAttribute(False)>
    <DesignTimeVisibleAttribute(False)>
    <DefaultEventAttribute("Click")>
    <DefaultPropertyAttribute("Text")>
    <ToolboxItemFilterAttribute("System.Windows.Forms")>
    <ListBindableAttribute(False)>
    <DesignerCategoryAttribute("Component")>
    Public Class OwnerDrawMenuItem 
       Inherits System.Windows.Forms.MenuItem
    'Usage
     
    Dim instance As OwnerDrawMenuItem
    [ToolboxItem(false)]
    [DesignTimeVisible(false)]
    [DefaultEvent("Click")]
    [DefaultProperty("Text")]
    [ToolboxItemFilter("System.Windows.Forms")]
    [ListBindable(false)]
    [DesignerCategory("Component")]
    public class OwnerDrawMenuItem : System.Windows.Forms.MenuItem 
    Remarks
    The class adds support for menu item icons. You can also associate a Command object to instances of this class.
    Example
    This example shows how to create a menu item:
    Dim item As OwnerDrawMenuItem =  New OwnerDrawMenuItem("New Item") 
    ' set an image
    item.Image = imageList1.Images(0)
    ' add it to a MainMenu object
    Me.Menu.MenuItems(0).MenuItems.Add(item)
    OwnerDrawMenuItem item = new OwnerDrawMenuItem("New Item");
    // set an image
    item.Image = imageList1.Images[0];
    // add it to a MainMenu object
    this.Menu.MenuItems[0].MenuItems.Add(item);
    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.ComponentModel.Component
             System.Windows.Forms.Menu
                System.Windows.Forms.MenuItem
                   Xceed.Chart.UIControls.OwnerDrawMenuItem

    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