DataGridColumn.MinWidth DataGridColumn.MinWidth DataGridColumn.MinWidth DataGridColumn.MinWidth Property

定義

取得或設定資料行的最小寬度條件約束。Gets or sets the minimum width constraint of the column.

public:
 property double MinWidth { double get(); void set(double value); };
public double MinWidth { get; set; }
member this.MinWidth : double with get, set
Public Property MinWidth As Double

屬性值

資料行的最小寬度,採用裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit)The minimum column width, in 裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit). 已註冊的預設值為20。The registered default is 20. 如需哪些因素會影響值的詳細資訊,請參閱 DependencyPropertyFor information about what can influence the value, see DependencyProperty.

備註

當您設定MinWidth屬性的值時,此值必須大於或等於0.0。When you set a value for the MinWidth property, the value must be greater than or equal to 0.0.

Double.PositiveInfinityDouble.NaN對此屬性而言是不正確值。Double.PositiveInfinity and Double.NaN are not valid values for this property. Double值的值限制是ValidateValueCallback由機制強制執行。The value restrictions on the Double value are enforced by a ValidateValueCallback mechanism. 如果您嘗試設定的值無效,則會擲回執行時間例外狀況。If you attempt to set a value that is not valid, a run-time exception is thrown.

DisplayValue 和屬性的會受到下列屬性的限制,如果已設定,DataGridColumn.Width則依優先順序排列: DataGrid.ColumnWidthThe DisplayValue of the DataGrid.ColumnWidth and DataGridColumn.Width properties are constrained by the following properties, if they are set, in order of precedence:

適用於

另請參閱