ColumnDefinition.MaxWidth 屬性

定義

取得或設定代表 ColumnDefinition 最大寬度的值。

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

屬性值

Double,代表最大寬度。 預設值是 PositiveInfinity

屬性

備註

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

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

XAML Attribute Usage

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

XAML 值

double
Double

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

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

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

in 為英吋;1in==96px

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

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

相依性屬性資訊

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

適用於