共用方式為


DataGrid.RowHeaderWidth Property

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

Gets or sets the width of the row header column.

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

Syntax

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

Property Value

Type: System.Double
The width of the row header column in pixels. The default is Double.NaN.

Exceptions

Exception Condition
ArgumentOutOfRangeException

When setting this property, the specified value is less than 4 or greater than 32768.

Remarks

Dependency property identifier field: RowHeaderWidthProperty

By default, DataGrid row headers are not displayed. To display row headers, the HeadersVisibility property must be set to DataGridHeadersVisibility.Row or DataGridHeadersVisibility.All. When row headers are displayed, they auto-size to fit their content by default.

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.