MenuItemCollectionEditor 클래스

정의

연결된 Items 컨트롤의 Menu 속성에서 지정한 컬렉션의 구성 요소 편집기를 제공합니다.

public ref class MenuItemCollectionEditor : System::Drawing::Design::UITypeEditor
public class MenuItemCollectionEditor : System.Drawing.Design.UITypeEditor
type MenuItemCollectionEditor = class
    inherit UITypeEditor
Public Class MenuItemCollectionEditor
Inherits UITypeEditor
상속
MenuItemCollectionEditor

예제

다음 코드 예제를 사용 하는 방법을 보여 줍니다를 EditorAttribute 연결할 특성을 MenuItemCollectionEditorUITypeEditor (컬렉션 편집기 기본 클래스)에서 파생 된 사용자 지정 컨트롤에서 속성을 사용 하 여 클래스를 WebControl 가져오고 설정 하는 클래스를 MenuItemCollection 컬렉션입니다.

private MenuItemCollection menuItems;

// Associate the MenuItemCollectionEditor with the Items. 
[Editor(typeof(System.Web.UI.Design.WebControls.
    MenuItemCollectionEditor),
    typeof(UITypeEditor))]
public MenuItemCollection Items
{
    get
    {
        // If there is no menuItems collection, create it.
        if (menuItems == null)
            menuItems = new MenuItemCollection();

        return menuItems;
    }
    set { menuItems = value; }
} // Items
Private menuItems As MenuItemCollection

' Associate the MenuItemCollectionEditor with the Items.
<EditorAttribute( GetType(System.Web.UI.Design.WebControls. _
    MenuItemCollectionEditor), _
    GetType(UITypeEditor))> _
Public Property Items() As MenuItemCollection
    Get
        If menuItems Is Nothing Then
            menuItems = New MenuItemCollection()
        End If
        Return menuItems
    End Get
    Set
        menuItems = value
    End Set
End Property ' Items

설명

MenuItemCollectionEditor 편집에 대 한 사용자 인터페이스를 제공 하는 클래스를 MenuItem 에 지정 된 컬렉션의 요소를 Items 연결 된 속성 Menu 컨트롤입니다.

합니다 MenuItemCollectionEditor 줄임표를 선택 하 여 호출 됩니다 (... ) 단추를 항목 속성에는 속성 비주얼 디자이너 또는 선택 하 여 그리드 메뉴 항목 편집 에서 일반적인 컨트롤에 대 한 상황에 맞는 메뉴입니다.

합니다 EditValue 연결 된 메뉴 항목 컬렉션에 대 한 값을 편집 하는 메서드 Menu 제어 합니다. GetEditStyle 메서드가이 편집기와 연결 된 편집 스타일을 가져옵니다.

생성자

MenuItemCollectionEditor()

MenuItemCollectionEditor 클래스의 새 인스턴스를 초기화합니다.

속성

IsDropDownResizable

드롭다운 편집기를 사용자가 크기 조정할 수 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 UITypeEditor)

메서드

EditValue(IServiceProvider, Object)

GetEditStyle() 메서드에 표시된 편집기 스타일을 사용하여 지정된 개체의 값을 편집합니다.

(다음에서 상속됨 UITypeEditor)
EditValue(ITypeDescriptorContext, IServiceProvider, Object)

관련 컨트롤의 메뉴 항목 컬렉션에 대한 값을 편집합니다.

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)

적용 대상

추가 정보