ColumnDefinition.MinWidth 屬性

定義

取得或設定表示 ColumnDefinition 之最小寬度的值。

public:
 property double MinWidth { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
public double MinWidth { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
member this.MinWidth : double with get, set
Public Property MinWidth As Double

屬性值

Double

Double,表示最小寬度。 預設值為 0。

屬性

備註

當您在相同的程式碼範例中一起使用這些值時, MinWidth 此值會優先于 MaxWidth 值,而該值會優先于 Width 值。

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

XAML Attribute Usage

<object MinWidth="double"/>  
- or -  
<object MinWidth="qualifiedDouble"/>  

XAML 值

double
Double

值等於或大於 0.0034 但等於或小於 160000Double 字串表示。 不合格的值是以裝置獨立圖元來測量。 字串不需要明確包含小數點。

qualifiedDouble
如上所述的 雙精度 浮點數,除了) 後面接著下列其中一個單位規範以外 Auto , (: px 、、 incm pt

px (預設) 是裝置獨立單位 (每單位 1/96 英吋)

in 為英吋;1in==96px

cm 為公分;1cm== (96/2.54) px

pt 為點;1pt== (96/72) px

相依性屬性資訊

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

適用於