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:
property GridLength Width {
	GridLength get ();
	void set (GridLength value);
}
<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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft