Xceed Chart for WinForms v4.4 Documentation
OwnerDrawMenuItem Class
Members  Example 


Xceed.Chart.UIControls.v4.4 Assembly > Xceed.Chart.UIControls Namespace : OwnerDrawMenuItem Class
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(ToolboxItemType=, ToolboxItemTypeName="")>
Public Class OwnerDrawMenuItem 
   Inherits System.Windows.Forms.MenuItem
'Usage
 
Dim instance As OwnerDrawMenuItem
[ToolboxItem(ToolboxItemType=, ToolboxItemTypeName="")]
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

Reference

OwnerDrawMenuItem Members
Xceed.Chart.UIControls Namespace