다음을 통해 공유


GridUnitTypeAttribute 클래스

이 클래스는 GridUnitType 값을 MEF 내보내기와 연결합니다.

상속 계층 구조

Object
  Attribute
    Microsoft.VisualStudio.Utilities.SingletonBaseMetadataAttribute
      Microsoft.VisualStudio.Text.Editor.GridUnitTypeAttribute

네임스페이스:  Microsoft.VisualStudio.Text.Editor
어셈블리:  Microsoft.VisualStudio.Text.UI.Wpf(Microsoft.VisualStudio.Text.UI.Wpf.dll)

구문

‘선언
<MetadataAttributeAttribute> _
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := False)> _
Public NotInheritable Class GridUnitTypeAttribute _
    Inherits SingletonBaseMetadataAttribute
[MetadataAttributeAttribute]
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public sealed class GridUnitTypeAttribute : SingletonBaseMetadataAttribute
[MetadataAttributeAttribute]
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Method|AttributeTargets::Property|AttributeTargets::Field, AllowMultiple = false)]
public ref class GridUnitTypeAttribute sealed : public SingletonBaseMetadataAttribute
[<Sealed>]
[<MetadataAttributeAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)>]
type GridUnitTypeAttribute =  
    class 
        inherit SingletonBaseMetadataAttribute 
    end
public final class GridUnitTypeAttribute extends SingletonBaseMetadataAttribute

GridUnitTypeAttribute 형식에서는 다음과 같은 멤버를 노출합니다.

생성자

  이름 설명
Public 메서드 GridUnitTypeAttribute GridUnitTypeAttribute 의 새 인스턴스를 초기화합니다.

위쪽

속성

  이름 설명
Public 속성 GridUnitType 눈금 단위 형식을 가져옵니다.
Public 속성 TypeId 파생 클래스에서 구현된 경우 이 Attribute에 대한 고유 식별자를 가져옵니다. (Attribute에서 상속됨)

위쪽

메서드

  이름 설명
Public 메서드 Equals 인프라입니다. 이 인스턴스가 지정된 개체와 같은지 여부를 나타내는 값을 반환합니다. (Attribute에서 상속됨)
Public 메서드 GetHashCode 이 인스턴스의 해시 코드를 반환합니다. (Attribute에서 상속됨)
Public 메서드 GetType 현재 인스턴스의 Type을 가져옵니다. (Object에서 상속됨)
Public 메서드 IsDefaultAttribute 파생 클래스에서 재정의된 경우 이 인스턴스의 값이 파생 클래스의 기본값인지 여부를 나타냅니다. (Attribute에서 상속됨)
Public 메서드 Match 파생 클래스에서 재정의된 경우 이 인스턴스가 지정된 개체와 같은지 여부를 나타내는 값을 반환합니다. (Attribute에서 상속됨)
Public 메서드 ToString 현재 개체를 나타내는 문자열을 반환합니다. (Object에서 상속됨)

위쪽

명시적 인터페이스 구현

  이름 설명
명시적 인터페이스 구현Private 메서드 System#Runtime#InteropServices#_Attribute#GetIDsOfNames 이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다. (Attribute에서 상속됨)
명시적 인터페이스 구현Private 메서드 System#Runtime#InteropServices#_Attribute#GetTypeInfo 인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다. (Attribute에서 상속됨)
명시적 인터페이스 구현Private 메서드 System#Runtime#InteropServices#_Attribute#GetTypeInfoCount 개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1). (Attribute에서 상속됨)
명시적 인터페이스 구현Private 메서드 System#Runtime#InteropServices#_Attribute#Invoke 개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다. (Attribute에서 상속됨)

위쪽

설명

이 특성 값을 내보낸된 개체의 렌더링 동작을 결정 하는 소비자가 사용 됩니다. 렌더링 동작 (예: WPF 클래스에 정의 된 동작과 일치 하 Grid)와 상호 작용 GridUnitType.

예제

[Export(typeof(IWpfTextViewMarginProvider))]
[Name(PredefinedMarginNames.VerticalScrollBar)]
[MarginContainer(PredefinedMarginNames.VerticalScrollBarContainerMargin)]
[ContentType("text")]
[TextViewRole(PredefinedTextViewRoles.Interactive)]
[GridUnitType(GridUnitType.Star)] //this size is determined as a weighted proportion of available space
internal sealed class VerticalScrollBarMarginProvider : IWpfTextViewMarginProvider 
{ */ implementation /* }

스레드로부터의 안전성

이 형식의 모든 공용 static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

참고 항목

참조

Microsoft.VisualStudio.Text.Editor 네임스페이스