MenuBindingsEditor 類別

定義

提供元件編輯器給關聯 DataBindings 控制項的 Menu 集合。

public ref class MenuBindingsEditor : System::Drawing::Design::UITypeEditor
public class MenuBindingsEditor : System.Drawing.Design.UITypeEditor
type MenuBindingsEditor = class
    inherit UITypeEditor
Public Class MenuBindingsEditor
Inherits UITypeEditor
繼承
MenuBindingsEditor

範例

下列程式碼範例示範如何使用 EditorAttribute 屬性,將 類別和 UITypeEditor 類別關聯 MenuBindingsEditor (系結編輯器基類,) 與衍生自 WebControl 類別之自訂控制項中的 屬性產生關聯,以取得和設定 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)

適用於

另請參閱