다음을 통해 공유


DesignerActionMethodItem 생성자

정의

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

오버로드

Name Description
DesignerActionMethodItem(DesignerActionList, String, String)

지정된 메서드와 표시 이름을 사용하여 클래스의 DesignerActionMethodItem 새 인스턴스를 초기화합니다.

DesignerActionMethodItem(DesignerActionList, String, String, Boolean)

지정된 메서드 및 표시 이름 및 항목이 다른 사용자 인터페이스 컨텍스트에 표시되어야 하는지 여부를 나타내는 플래그를 사용하여 클래스의 새 인스턴스 DesignerActionMethodItem 를 초기화합니다.

DesignerActionMethodItem(DesignerActionList, String, String, String)

지정된 메서드, 표시 및 범주 이름을 사용하여 클래스의 DesignerActionMethodItem 새 인스턴스를 초기화합니다.

DesignerActionMethodItem(DesignerActionList, String, String, String, Boolean)

지정된 메서드, 표시 및 범주 이름 및 항목이 다른 사용자 인터페이스 컨텍스트에 표시되어야 하는지 여부를 나타내는 플래그를 사용하여 클래스의 새 인스턴스 DesignerActionMethodItem 를 초기화합니다.

DesignerActionMethodItem(DesignerActionList, String, String, String, String)

지정된 메서드 및 범주 이름과 표시 및 설명 텍스트를 사용하여 클래스의 DesignerActionMethodItem 새 인스턴스를 초기화합니다.

DesignerActionMethodItem(DesignerActionList, String, String, String, String, Boolean)

지정된 메서드 및 범주 이름, 표시 및 설명 텍스트 및 항목이 다른 사용자 인터페이스 컨텍스트에 표시되어야 하는지 여부를 나타내는 플래그를 사용하여 클래스의 새 인스턴스 DesignerActionMethodItem 를 초기화합니다.

DesignerActionMethodItem(DesignerActionList, String, String)

Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs

지정된 메서드와 표시 이름을 사용하여 클래스의 DesignerActionMethodItem 새 인스턴스를 초기화합니다.

public:
 DesignerActionMethodItem(System::ComponentModel::Design::DesignerActionList ^ actionList, System::String ^ memberName, System::String ^ displayName);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList? actionList, string? memberName, string? displayName);
new System.ComponentModel.Design.DesignerActionMethodItem : System.ComponentModel.Design.DesignerActionList * string * string -> System.ComponentModel.Design.DesignerActionMethodItem
Public Sub New (actionList As DesignerActionList, memberName As String, displayName As String)

매개 변수

actionList
DesignerActionList

DesignerActionList 이 항목이 연결된 메서드를 포함하는 값입니다.

memberName
String

패널 항목을 통해 호출하기 위해 파생된 DesignerActionList 클래스에 있는 메서드의 대/소문자를 구분하는 이름입니다.

displayName
String

이 항목의 패널 텍스트입니다.

설명

DesignerActionMethodItem 생성자는 속성과 CategoryDescription 속성을 nullIncludeAsDesignerVerbfalse설정합니다.

추가 정보

적용 대상

DesignerActionMethodItem(DesignerActionList, String, String, Boolean)

Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs

지정된 메서드 및 표시 이름 및 항목이 다른 사용자 인터페이스 컨텍스트에 표시되어야 하는지 여부를 나타내는 플래그를 사용하여 클래스의 새 인스턴스 DesignerActionMethodItem 를 초기화합니다.

public:
 DesignerActionMethodItem(System::ComponentModel::Design::DesignerActionList ^ actionList, System::String ^ memberName, System::String ^ displayName, bool includeAsDesignerVerb);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName, bool includeAsDesignerVerb);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList? actionList, string? memberName, string? displayName, bool includeAsDesignerVerb);
new System.ComponentModel.Design.DesignerActionMethodItem : System.ComponentModel.Design.DesignerActionList * string * string * bool -> System.ComponentModel.Design.DesignerActionMethodItem
Public Sub New (actionList As DesignerActionList, memberName As String, displayName As String, includeAsDesignerVerb As Boolean)

매개 변수

actionList
DesignerActionList

DesignerActionList 이 항목이 연결된 메서드를 포함하는 값입니다.

memberName
String

패널 항목을 통해 호출하기 위해 파생된 DesignerActionList 클래스에 있는 메서드의 대/소문자를 구분하는 이름입니다.

displayName
String

이 항목의 패널 텍스트입니다.

includeAsDesignerVerb
Boolean

연결된 메서드를 디자이너 동사로 처리할지 여부를 지정하는 플래그입니다.

설명

매개 변수가 includeAsDesignerVerb 설정된 true경우 이 항목도 고려 DesignerVerb되므로 구성 요소의 디자인 타임 바로 가기 메뉴에 추가됩니다. Visual Studio에서는 속성 창의 특성 창에도 명령이 추가됩니다. 디자이너의 컬렉션 속성을 통해 디자이너 Verbs 동사 목록에 액세스할 수 있습니다.

DesignerActionMethodItem 생성자는 및 Description 속성을 .로 null설정합니다Category.

추가 정보

적용 대상

DesignerActionMethodItem(DesignerActionList, String, String, String)

Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs

지정된 메서드, 표시 및 범주 이름을 사용하여 클래스의 DesignerActionMethodItem 새 인스턴스를 초기화합니다.

public:
 DesignerActionMethodItem(System::ComponentModel::Design::DesignerActionList ^ actionList, System::String ^ memberName, System::String ^ displayName, System::String ^ category);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName, string category);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList? actionList, string? memberName, string? displayName, string? category);
new System.ComponentModel.Design.DesignerActionMethodItem : System.ComponentModel.Design.DesignerActionList * string * string * string -> System.ComponentModel.Design.DesignerActionMethodItem
Public Sub New (actionList As DesignerActionList, memberName As String, displayName As String, category As String)

매개 변수

actionList
DesignerActionList

DesignerActionList 이 항목이 연결된 메서드를 포함하는 값입니다.

memberName
String

패널 항목을 통해 호출하기 위해 파생된 DesignerActionList 클래스에 있는 메서드의 대/소문자를 구분하는 이름입니다.

displayName
String

이 항목의 패널 텍스트입니다.

category
String

패널에서 유사한 항목을 그룹화하기 위해 사용되는 대/소문자를 구분 String 합니다.

설명

DesignerActionMethodItem 생성자는 속성을 설정 DescriptionnullIncludeAsDesignerVerb 속성을 false.

매개 변수를 사용하여 패널의 category 항목을 그룹화하는 방법에 대한 자세한 내용은 메서드를 참조하세요 GetSortedActionItems .

추가 정보

적용 대상

DesignerActionMethodItem(DesignerActionList, String, String, String, Boolean)

Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs

지정된 메서드, 표시 및 범주 이름 및 항목이 다른 사용자 인터페이스 컨텍스트에 표시되어야 하는지 여부를 나타내는 플래그를 사용하여 클래스의 새 인스턴스 DesignerActionMethodItem 를 초기화합니다.

public:
 DesignerActionMethodItem(System::ComponentModel::Design::DesignerActionList ^ actionList, System::String ^ memberName, System::String ^ displayName, System::String ^ category, bool includeAsDesignerVerb);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName, string category, bool includeAsDesignerVerb);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList? actionList, string? memberName, string? displayName, string? category, bool includeAsDesignerVerb);
new System.ComponentModel.Design.DesignerActionMethodItem : System.ComponentModel.Design.DesignerActionList * string * string * string * bool -> System.ComponentModel.Design.DesignerActionMethodItem
Public Sub New (actionList As DesignerActionList, memberName As String, displayName As String, category As String, includeAsDesignerVerb As Boolean)

매개 변수

actionList
DesignerActionList

DesignerActionList 이 항목이 연결된 메서드를 포함하는 값입니다.

memberName
String

패널 항목을 통해 호출하기 위해 파생된 DesignerActionList 클래스에 있는 메서드의 대/소문자를 구분하는 이름입니다.

displayName
String

이 항목의 패널 텍스트입니다.

category
String

패널에서 유사한 항목을 그룹화하기 위해 사용되는 대/소문자를 구분 String 합니다.

includeAsDesignerVerb
Boolean

연결된 메서드를 연결된 구성 요소의 디자이너 동사로 처리할지 여부를 지정하는 플래그입니다.

설명

매개 변수가 includeAsDesignerVerb 설정된 true경우 항목도 것으로 DesignerVerb간주되므로 구성 요소의 디자인 타임 바로 가기 메뉴에 추가됩니다. 디자이너의 컬렉션 속성을 통해 디자이너 Verbs 동사 목록에 액세스할 수 있습니다.

DesignerActionMethodItem 생성자는 속성을 .로 Descriptionnull설정합니다.

매개 변수를 사용하여 패널의 category 항목을 그룹화하는 방법에 대한 자세한 내용은 메서드를 참조하세요 GetSortedActionItems .

추가 정보

적용 대상

DesignerActionMethodItem(DesignerActionList, String, String, String, String)

Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs

지정된 메서드 및 범주 이름과 표시 및 설명 텍스트를 사용하여 클래스의 DesignerActionMethodItem 새 인스턴스를 초기화합니다.

public:
 DesignerActionMethodItem(System::ComponentModel::Design::DesignerActionList ^ actionList, System::String ^ memberName, System::String ^ displayName, System::String ^ category, System::String ^ description);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName, string category, string description);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList? actionList, string? memberName, string? displayName, string? category, string? description);
new System.ComponentModel.Design.DesignerActionMethodItem : System.ComponentModel.Design.DesignerActionList * string * string * string * string -> System.ComponentModel.Design.DesignerActionMethodItem
Public Sub New (actionList As DesignerActionList, memberName As String, displayName As String, category As String, description As String)

매개 변수

actionList
DesignerActionList

DesignerActionList 이 항목이 연결된 메서드를 포함하는 값입니다.

memberName
String

패널 항목을 통해 호출하기 위해 파생된 DesignerActionList 클래스에 있는 메서드의 대/소문자를 구분하는 이름입니다.

displayName
String

이 항목의 패널 텍스트입니다.

category
String

패널에서 유사한 항목을 그룹화하기 위해 사용되는 대/소문자를 구분 String 합니다.

description
String

도구 설명 또는 상태 표시줄에 사용되는 이 항목에 대한 추가 텍스트입니다.

설명

DesignerActionMethodItem 생성자는 속성을 .로 IncludeAsDesignerVerbfalse설정합니다.

매개 변수를 사용하여 패널의 category 항목을 그룹화하는 방법에 대한 자세한 내용은 메서드를 참조하세요 GetSortedActionItems .

추가 정보

적용 대상

DesignerActionMethodItem(DesignerActionList, String, String, String, String, Boolean)

Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs
Source:
DesignerActionMethodItem.cs

지정된 메서드 및 범주 이름, 표시 및 설명 텍스트 및 항목이 다른 사용자 인터페이스 컨텍스트에 표시되어야 하는지 여부를 나타내는 플래그를 사용하여 클래스의 새 인스턴스 DesignerActionMethodItem 를 초기화합니다.

public:
 DesignerActionMethodItem(System::ComponentModel::Design::DesignerActionList ^ actionList, System::String ^ memberName, System::String ^ displayName, System::String ^ category, System::String ^ description, bool includeAsDesignerVerb);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList actionList, string memberName, string displayName, string category, string description, bool includeAsDesignerVerb);
public DesignerActionMethodItem(System.ComponentModel.Design.DesignerActionList? actionList, string? memberName, string? displayName, string? category, string? description, bool includeAsDesignerVerb);
new System.ComponentModel.Design.DesignerActionMethodItem : System.ComponentModel.Design.DesignerActionList * string * string * string * string * bool -> System.ComponentModel.Design.DesignerActionMethodItem
Public Sub New (actionList As DesignerActionList, memberName As String, displayName As String, category As String, description As String, includeAsDesignerVerb As Boolean)

매개 변수

actionList
DesignerActionList

DesignerActionList 이 항목이 연결된 메서드를 포함하는 값입니다.

memberName
String

패널 항목을 통해 호출하기 위해 파생된 DesignerActionList 클래스에 있는 메서드의 대/소문자를 구분하는 이름입니다.

displayName
String

이 항목의 패널 텍스트입니다.

category
String

패널에서 유사한 항목을 그룹화하기 위해 사용되는 대/소문자를 구분 String 합니다.

description
String

도구 설명 또는 상태 표시줄에 사용되는 이 항목에 대한 추가 텍스트입니다.

includeAsDesignerVerb
Boolean

연결된 메서드를 연결된 구성 요소의 디자이너 동사로 처리할지 여부를 지정하는 플래그입니다.

예제

다음 코드 예제에서는 개체 컬렉션을 DesignerActionItem 만드는 방법을 보여 줍니다.

스마트 태그를 구현하는 전체 예제는 방법: Windows Forms 구성 요소에 스마트 태그 첨부를 참조하세요.

public override DesignerActionItemCollection GetSortedActionItems()
{
    DesignerActionItemCollection items = new DesignerActionItemCollection();

    //Define static section header entries.
    items.Add(new DesignerActionHeaderItem("Appearance"));
    items.Add(new DesignerActionHeaderItem("Information"));

    //Boolean property for locking color selections.
    items.Add(new DesignerActionPropertyItem("LockColors",
                     "Lock Colors", "Appearance",
                     "Locks the color properties."));
    if (!LockColors)
    {
        items.Add(new DesignerActionPropertyItem("BackColor",
                         "Back Color", "Appearance",
                         "Selects the background color."));
        items.Add(new DesignerActionPropertyItem("ForeColor",
                         "Fore Color", "Appearance",
                         "Selects the foreground color."));

        //This next method item is also added to the context menu 
        // (as a designer verb).
        items.Add(new DesignerActionMethodItem(this,
                         "InvertColors", "Invert Colors",
                         "Appearance",
                         "Inverts the fore and background colors.",
                          true));
    }
    items.Add(new DesignerActionPropertyItem("Text",
                     "Text String", "Appearance",
                     "Sets the display text."));

    //Create entries for static Information section.
    StringBuilder location = new StringBuilder("Location: ");
    location.Append(colLabel.Location);
    StringBuilder size = new StringBuilder("Size: ");
    size.Append(colLabel.Size);
    items.Add(new DesignerActionTextItem(location.ToString(),
                     "Information"));
    items.Add(new DesignerActionTextItem(size.ToString(),
                     "Information"));

    return items;
}
Public Overrides Function GetSortedActionItems() _
As DesignerActionItemCollection
    Dim items As New DesignerActionItemCollection()

    'Define static section header entries.
    items.Add(New DesignerActionHeaderItem("Appearance"))
    items.Add(New DesignerActionHeaderItem("Information"))

    'Boolean property for locking color selections.
    items.Add(New DesignerActionPropertyItem( _
    "LockColors", _
    "Lock Colors", _
    "Appearance", _
    "Locks the color properties."))

    If Not LockColors Then
        items.Add( _
        New DesignerActionPropertyItem( _
        "BackColor", _
        "Back Color", _
        "Appearance", _
        "Selects the background color."))

        items.Add( _
        New DesignerActionPropertyItem( _
        "ForeColor", _
        "Fore Color", _
        "Appearance", _
        "Selects the foreground color."))

        'This next method item is also added to the context menu 
        ' (as a designer verb).
        items.Add( _
        New DesignerActionMethodItem( _
        Me, _
        "InvertColors", _
        "Invert Colors", _
        "Appearance", _
        "Inverts the fore and background colors.", _
        True))
    End If
    items.Add( _
    New DesignerActionPropertyItem( _
    "Text", _
    "Text String", _
    "Appearance", _
    "Sets the display text."))

    'Create entries for static Information section.
    Dim location As New StringBuilder("Location: ")
    location.Append(colLabel.Location)
    Dim size As New StringBuilder("Size: ")
    size.Append(colLabel.Size)

    items.Add( _
    New DesignerActionTextItem( _
    location.ToString(), _
    "Information"))

    items.Add( _
    New DesignerActionTextItem( _
    size.ToString(), _
    "Information"))

    Return items
End Function

설명

매개 변수가 includeAsDesignerVerb 설정된 true경우 이 항목도 고려 DesignerVerb되므로 구성 요소의 디자인 타임 바로 가기 메뉴에 추가됩니다. 디자이너의 컬렉션 속성을 통해 디자이너 Verbs 동사 목록에 액세스할 수 있습니다.

매개 변수를 사용하여 패널의 category 항목을 그룹화하는 방법에 대한 자세한 내용은 메서드를 참조하세요 GetSortedActionItems .

추가 정보

적용 대상