다음을 통해 공유


DesignerAutoFormat.Name 속성

정의

개체의 DesignerAutoFormat 이름을 가져옵니다.

public:
 property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

속성 값

이름입니다 DesignerAutoFormat .

예제

다음 코드 예제에서는 개체의 속성을 재정 AutoFormatsControlDesigner 하여 컬렉션에 세 개의 명명된 형식을 만들고 추가하는 방법을 보여 줍니다.

// The collection of AutoFormat objects for the IndentLabel object
public override DesignerAutoFormatCollection AutoFormats
{
    get
    {
        if (_autoFormats == null)
        {
            // Create the collection
            _autoFormats = new DesignerAutoFormatCollection();

            // Create and add each AutoFormat object
            _autoFormats.Add(new IndentLabelAutoFormat("MyClassic"));
            _autoFormats.Add(new IndentLabelAutoFormat("MyBright"));
            _autoFormats.Add(new IndentLabelAutoFormat("Default"));
        }
        return _autoFormats;
    }
}
' The collection of AutoFormat objects for the IndentLabel object
Public Overrides ReadOnly Property AutoFormats() As DesignerAutoFormatCollection
    Get
        If _autoFormats Is Nothing Then
            ' Create the collection
            _autoFormats = New DesignerAutoFormatCollection()

            ' Create and add each AutoFormat object
            _autoFormats.Add(New IndentLabelAutoFormat("MyClassic"))
            _autoFormats.Add(New IndentLabelAutoFormat("MyBright"))
            _autoFormats.Add(New IndentLabelAutoFormat("Default"))
        End If

        Return _autoFormats
    End Get
End Property

설명

Visual Studio 2005와 같은 비주얼 디자이너는 컬렉션에 있는 AutoFormatsDesignerAutoFormat 개체의 ControlDesigner 속성을 사용하여 Name 사용 가능한 자동 스타일 형식 목록을 만듭니다.

적용 대상

추가 정보