ColumnDefinition.Width 屬性

定義

取得 ColumnDefinition 項目的計算寬度,或設定 ColumnDefinition 所定義之資料行的 GridLength 值。

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。

備註

預設 GridUnitTypeStar

當您加入或移除資料列或資料行時, ActualWidth 所有 ColumnDefinition 元素的 和 ActualHeight 都會 RowDefinition 變成零,直到呼叫 為止 Measure

相依性屬性資訊

識別碼欄位 WidthProperty
中繼資料屬性設定為 true

適用於