GridCellLengthAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class associates a grid cell size with a MEF export.
public ref class GridCellLengthAttribute sealed : Microsoft::VisualStudio::Utilities::SingletonBaseMetadataAttribute
public ref class GridCellLengthAttribute 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 GridCellLengthAttribute : 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 GridCellLengthAttribute = class
inherit SingletonBaseMetadataAttribute
Public NotInheritable Class GridCellLengthAttribute
Inherits SingletonBaseMetadataAttribute
- Inheritance
- Attributes
Examples
[Export(typeof(IWpfTextViewMarginProvider))]
[Name(PredefinedMarginNames.VerticalScrollBar)]
[MarginContainer(PredefinedMarginNames.VerticalScrollBarContainerMargin)]
[ContentType("text")]
[TextViewRole(PredefinedTextViewRoles.Interactive)]
[GridUnitType(GridUnitType.Pixel)] //this size is expressed as a pixel using the GridCellLength attribute
[GridCellLength(15)] //15 pixels wide
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 GridLength.
This class is used in combination with GridUnitTypeAttribute to create a GridLength for a cell in a Grid.
Constructors
GridCellLengthAttribute(Double) |
Constructs a GridCellLengthAttribute. |
Properties
GridCellLength |
Gets the grid cell length. |