Represents the length of elements that explicitly support Star unit types.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
Thetype exposes the following members.
|Auto||Gets an instance of that holds a value whose size is determined by the size properties of the content object.|
|GridUnitType||Gets the associated GridUnitType for the .|
|IsAbsolute||Gets a value that indicates whether the holds a value that is expressed in pixels.|
|IsAuto||Gets a value that indicates whether the holds a value whose size is determined by the size properties of the content object.|
|IsStar||Gets a value that indicates whether the holds a value that is expressed as a weighted proportion of available space.|
|Value||Gets a Double that represents the value of the .|
|Equals(GridLength)||Determines whether the specified is equal to the current .|
|Equals(Object)||Determines whether the specified object is equal to the current instance. (Overrides ValueType::Equals(Object).)|
|GetHashCode||Gets a hash code for the . (Overrides ValueType::GetHashCode().)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|ToString||Returns a String representation of the . (Overrides ValueType::ToString().)|
The following example shows how to create and use an instance of GridLengthConverter. The example defines a custom method called changeCol, which passes the ListBoxItem to a GridLengthConverter that converts the Content of a ListBoxItem to an instance of . The converted value is then passed back as the value of the Width property of the ColumnDefinition element.
The example also defines a second custom method, called changeColVal. This custom method converts the Value of a Slider to a String and then passes that value back to the ColumnDefinition as the Width of the element.
Note that a separate Extensible Application Markup Language (XAML) file defines the contents of a ListBoxItem.
|How to: Build a Standard UI Dialog Box by Using Grid||This example shows how to create a standard user interface (UI) dialog box by using the Grid element.|
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)