DataGridView.AdjustedTopLeftHeaderBorderStyle 属性

定义

获取 DataGridView 左上角单元格的边框样式。Gets the border style for the upper-left cell in the DataGridView.

public:
 virtual property System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ AdjustedTopLeftHeaderBorderStyle { System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ get(); };
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.DataGridViewAdvancedBorderStyle AdjustedTopLeftHeaderBorderStyle { get; }
member this.AdjustedTopLeftHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle
Public Overridable ReadOnly Property AdjustedTopLeftHeaderBorderStyle As DataGridViewAdvancedBorderStyle

属性值

一个 DataGridViewAdvancedBorderStyle,表示 DataGridView 左上角单元格的边框样式。A DataGridViewAdvancedBorderStyle that represents the style of the border of the upper-left cell in the DataGridView.

属性

示例

下面的代码示例演示如何重写 AdjustedTopLeftHeaderBorderStyle 属性以自定义左上角单元格的边框。The following code example demonstrates how to override the AdjustedTopLeftHeaderBorderStyle property to customize the borders of the upper-left cell. 此代码示例是为 DataGridViewAdvancedBorderStyle 类提供的更大示例的一部分。This code example is part of a larger example provided for the DataGridViewAdvancedBorderStyle class.

public override DataGridViewAdvancedBorderStyle AdjustedTopLeftHeaderBorderStyle
{
    get
    {
        DataGridViewAdvancedBorderStyle newStyle =
            new DataGridViewAdvancedBorderStyle();
        newStyle.Top = DataGridViewAdvancedCellBorderStyle.None;
        newStyle.Left = DataGridViewAdvancedCellBorderStyle.None;
        newStyle.Bottom = DataGridViewAdvancedCellBorderStyle.Outset;
        newStyle.Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble;
        return newStyle;
    }
}
Public Overrides ReadOnly Property AdjustedTopLeftHeaderBorderStyle() _
    As DataGridViewAdvancedBorderStyle
    Get
        Dim newStyle As New DataGridViewAdvancedBorderStyle()
        With newStyle
            .Top = DataGridViewAdvancedCellBorderStyle.None
            .Left = DataGridViewAdvancedCellBorderStyle.None
            .Bottom = DataGridViewAdvancedCellBorderStyle.Outset
            .Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble
        End With
        Return newStyle
    End Get
End Property

注解

左上角的单元格是由列标题行和行标题列共享的单元格。The upper-left cell is the cell that is shared by the column header row and the row header column. @No__t-0 获取此属性的值,同时绘制左上角的单元格。The DataGridView gets the value of this property while painting the upper-left cell.

继承者说明

如果要自定义左上角标题单元格的边框外观,请覆盖此属性。Override this property if you want to customize the appearance of the border on the upper-left header cell.

适用于

另请参阅