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. 當繪製左上方資料格時,DataGridView 會取得這個屬性的值。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.

適用於

另請參閱