Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataGridLengthUnitType Enumeration

Defines constants that describe how DataGrid elements, such as columns, are sized.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)
public enum DataGridLengthUnitType
<object property = "enumMemberName"/>

Member nameDescription
AutoThe unit of measure is based on the size of the cells and the column header.
PixelThe unit of measure is expressed in pixels.
SizeToCellsThe unit of measure is based on the size of the cells.
SizeToHeaderThe unit of measure is based on the size of the column header.
StarThe unit of measure is a weighted proportion of the available space.

This enumeration is used with the UnitType property of a DataGridLength type to indicate how elements are sized relative to other elements in a DataGrid. The DataGridLength type is used for sizing properties, such as DataGrid.ColumnWidth.

In Silverlight 4 and later, the star sizing mode can be used to distribute available space by weighted proportions.

In Extensible Application Markup Language (XAML), star values are expressed as n* where n represents a numeric value. 1* is equivalent to *. For example if two columns in a DataGrid had widths of * and 2*, the first column would receive one portion of the available space and the second column would receive two portions of the available space.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2014 Microsoft. All rights reserved.