Share via


XRGridLength (Compact 2013)

3/28/2014

This structure represents the length of elements that support variable distribution of available space, such as grid columns and rows.

Syntax

struct XRGridLength{
  float UnitValue;
    XRGridUnitType UnitType;
};

Members

  • UnitValue
    The length in units, which are specified by UnitType. Together, UnitType and **UnitValue****determine the size of a column or row.
  • UnitType
    XRGridUnitType enumerated type that indicates how to interpret UnitValue in order to calculate the size of a column or row. UnitType accepts the following enumeration values:

    • XRGridUnitType_Auto   UnitValue is ignored because the size is determined by the size of the objects in the column or row.
    • XRGridUnitType_Pixel   UnitValue represents a fixed size, in pixels.
    • XRGridUnitType_Star   UnitValue represents a weighted proportion of the available space.

Remarks

In Extensible Application Markup Language (XAML), you allocate available space with star sizings, which are expressed as * or <n>*. For example, with two columns in a grid, one sized * and the other sized 2*, the first would receive a third of the available space, and the second would receive two-thirds of the available space.

.NET Framework Equivalent

System.Windows.GridLength

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

XAML for Windows Embedded Structures
XRGridUnitType
IXRColumnDefinition::GetWidth
IXRColumnDefinition::SetWidth
IXRRowDefinition::GetHeight
IXRRowDefinition::SetHeight