Export (0) Print
Expand All

ColumnDefinition.Width Property

Gets the calculated width of a ColumnDefinition element, or sets the GridLength value of a column that is defined by the ColumnDefinition.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public GridLength Width { get; set; }
<object Width="GridLength" .../>

Property Value

Type: System.Windows.GridLength
The GridLength that represents the width of the Column. The default value is 1.0.

Identifier field

WidthProperty

Metadata properties set to true

None

The default GridUnitType is Star.

When you add or remove rows or columns, the ActualWidth for all ColumnDefinition elements and the ActualHeight of all RowDefinition elements becomes zero until Measure is called.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft