GridUnitTypeAttribute Class

Definition

This class associates a GridUnitType value with a MEF export.

public ref class GridUnitTypeAttribute sealed : Microsoft::VisualStudio::Utilities::SingletonBaseMetadataAttribute
public ref class GridUnitTypeAttribute sealed : Microsoft::VisualStudio::Utilities::SingletonBaseMetadataAttribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=false)]
[System.ComponentModel.Composition.MetadataAttribute]
public sealed class GridUnitTypeAttribute : Microsoft.VisualStudio.Utilities.SingletonBaseMetadataAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=false)>]
[<System.ComponentModel.Composition.MetadataAttribute>]
type GridUnitTypeAttribute = class
    inherit SingletonBaseMetadataAttribute
Public NotInheritable Class GridUnitTypeAttribute
Inherits SingletonBaseMetadataAttribute
Inheritance
Attributes

Examples

[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 /* }

Remarks

The value of this attribute will be used by the consumers to decide rendering behavior for the exported object. The rendering behavior will match the behavior defined in WPF classes (e.g. Grid) that interact with GridUnitType.

Constructors

GridUnitTypeAttribute(GridUnitType)

Constructs a GridUnitTypeAttribute.

Properties

GridUnitType

Gets the GridUnitType.

Applies to