DataGridViewAdvancedCellBorderStyle DataGridViewAdvancedCellBorderStyle DataGridViewAdvancedCellBorderStyle DataGridViewAdvancedCellBorderStyle Enum

定义

指定可以应用于 DataGridView 控件的单元格的边框样式。Specifies the border styles that can be applied to the cells of a DataGridView control.

public enum class DataGridViewAdvancedCellBorderStyle
public enum DataGridViewAdvancedCellBorderStyle
type DataGridViewAdvancedCellBorderStyle = 
Public Enum DataGridViewAdvancedCellBorderStyle
继承
DataGridViewAdvancedCellBorderStyleDataGridViewAdvancedCellBorderStyleDataGridViewAdvancedCellBorderStyleDataGridViewAdvancedCellBorderStyle

字段

Inset Inset Inset Inset 3

单线凹陷边框。A single-line sunken border.

InsetDouble InsetDouble InsetDouble InsetDouble 4

双线凹陷边框。A double-line sunken border.

None None None None 1

无边框。No borders.

NotSet NotSet NotSet NotSet 0

未设置边框。The border is not set.

Outset Outset Outset Outset 5

单线凸起边框。A single-line raised border.

OutsetDouble OutsetDouble OutsetDouble OutsetDouble 6

双线凸起边框。A double-line raised border.

OutsetPartial OutsetPartial OutsetPartial OutsetPartial 7

包含凸起部分的单线边框。A single-line border containing a raised portion.

Single Single Single Single 2

单行边框。A single-line border.

示例

下面的代码示例演示如何重写DataGridView.AdjustedTopLeftHeaderBorderStyle属性可自定义的左上角单元格边框。The following code example demonstrates how to override the DataGridView.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

注解

AdvancedCellBorderStyle的属性DataGridView控制返回类型的对象DataGridViewAdvancedBorderStyle,其中包含类型的属性DataGridViewAdvancedCellBorderStyleThe AdvancedCellBorderStyle property of the DataGridView control returns an object of type DataGridViewAdvancedBorderStyle, which has properties of type DataGridViewAdvancedCellBorderStyle.

适用于

另请参阅