MenuBindingsEditor 类  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为关联的 DataBindings 控件的 Menu 集合提供组件编辑器。
public ref class MenuBindingsEditor : System::Drawing::Design::UITypeEditorpublic class MenuBindingsEditor : System.Drawing.Design.UITypeEditortype MenuBindingsEditor = class
    inherit UITypeEditorPublic Class MenuBindingsEditor
Inherits UITypeEditor- 继承
示例
下面的代码示例演示如何使用EditorAttribute特性将类和UITypeEditor类关联 (绑定编辑器基类) 与从WebControl类派生的自定义控件中的属性相关联MenuBindingsEditor,该属性获取和设置MenuItemCollection集合。
private MenuItemBindingCollection localBindings;
// Associate the MenuBindingsEditor with the DataBindings. 
[Editor(typeof(System.Web.UI.Design.WebControls.MenuBindingsEditor),
    typeof(UITypeEditor))]
public MenuItemBindingCollection DataBindings
{
    get { return localBindings; }
    set { localBindings = value; }
} // DataBindings
Private localBindings As MenuItemBindingCollection
' Associate the MenuBindingsEditor with the DataBindings.
<EditorAttribute( GetType(System.Web.UI.Design.WebControls. _
    MenuBindingsEditor), _
    GetType(UITypeEditor))> _
Public Property DataBindings() As MenuItemBindingCollection
    Get
        Return localBindings
    End Get
    Set
        localBindings = value
    End Set
End Property ' DataBindings
注解
该MenuBindingsEditor类提供一个用户界面,用于编辑MenuItemBinding关联Menu控件中集合的DataBindings元素。
通过在MenuBindingsEditor视觉设计器 的属性网格的 DataBindings 属性上选择省略号 (...) 按钮,或通过从控件上的 “常见任务”上下文菜单中选择 “编辑菜单项”来调用该对象。
该方法 EditValue 编辑关联 Menu 控件的数据绑定集合的值。 该方法 GetEditStyle 获取与此编辑器关联的编辑样式。
构造函数
| MenuBindingsEditor() | 初始化 MenuBindingsEditor 类的新实例。 | 
属性
| IsDropDownResizable | 获取一个值,该值指示是否应由用户调整下拉编辑器的大小。(继承自 UITypeEditor) | 
方法
| EditValue(IServiceProvider, Object) | 使用 GetEditStyle() 方法所指示的编辑器样式编辑指定对象的值。(继承自 UITypeEditor) | 
| EditValue(ITypeDescriptorContext, IServiceProvider, Object) | 编辑关联的 Menu 控件的数据绑定集合的值。 | 
| Equals(Object) | 确定指定对象是否等于当前对象。(继承自 Object) | 
| GetEditStyle() | 获取由 EditValue(IServiceProvider, Object) 方法使用的编辑器样式。(继承自 UITypeEditor) | 
| GetEditStyle(ITypeDescriptorContext) | 获取与此编辑器关联的编辑样式。 | 
| GetHashCode() | 作为默认哈希函数。(继承自 Object) | 
| GetPaintValueSupported() | 指示该编辑器是否支持绘制对象值的表示形式。(继承自 UITypeEditor) | 
| GetPaintValueSupported(ITypeDescriptorContext) | 指示指定的上下文是否支持在指定的上下文内绘制对象值的表示形式。(继承自 UITypeEditor) | 
| GetType() | 获取当前实例的 Type。(继承自 Object) | 
| MemberwiseClone() | 创建当前 Object 的浅表副本。(继承自 Object) | 
| PaintValue(Object, Graphics, Rectangle) | 将指定对象值表示形式绘制到指定的画布上。(继承自 UITypeEditor) | 
| PaintValue(PaintValueEventArgs) | 使用指定的 PaintValueEventArgs 绘制某个对象的值的表示形式。(继承自 UITypeEditor) | 
| ToString() | 返回表示当前对象的字符串。(继承自 Object) |