次の方法で共有


DataGridColumn.MinWidth Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the minimum column width in pixels.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)

Syntax

'Declaration
Public Property MinWidth As Double
public double MinWidth { get; set; }
<sdk:dataGridColumn MinWidth="double"/>

XAML Values

Property Value

Type: System.Double
The minimum column width in pixels, or 0 if the value is not set. The default is 0.

Exceptions

Exception Condition
ArgumentOutOfRangeException

When setting this property, the specified value is less than 0.

-or-

The specified value is greater than the DataGridColumn.MaxWidth.

-or-

The specified value is greater than the DataGrid.MaxColumnWidth and the DataGridColumn.MaxWidth is not set.

ArgumentException

The specified value is NaN.

-or-

The specified value is PositiveInfinity.

Remarks

This property overrides the DataGrid.MinColumnWidth property.

If the DataGridColumn.MaxWidth property is set, MinWidth must be less than or equal to the MaxWidth property value. If the DataGridColumn.MaxWidth property is not set, MinWidth must be less than or equal to the DataGrid.MaxColumnWidth property value.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.