语言

ColumnDefinition.Width 属性

定义

获取元素的计算宽度,或设置由 <a0/> 定义的列的值。

public:
 property System::Windows::GridLength Width { System::Windows::GridLength get(); void set(System::Windows::GridLength value); };
public System.Windows.GridLength Width { get; set; }
member this.Width : System.Windows.GridLength with get, set
Public Property Width As GridLength

属性值

表示 GridLength 列的宽度。 默认值为 1.0。

注解

默认 GridUnitType 为 Star。

添加或删除行或列时, ActualWidth 所有 ColumnDefinition 元素的所有元素和 ActualHeight 所有 RowDefinition 元素变为零,直到 Measure 调用为止。

Dependency 属性信息

项目 价值
标识符字段 WidthProperty
元数据属性设置为 true None

适用于