VisualStyleElement.StartPanel.PlaceListSeparator 类

定义

为“开始”菜单右侧各项组的分隔条提供 VisualStyleElement。 此类不能被继承。

C#
public static class VisualStyleElement.StartPanel.PlaceListSeparator
继承
VisualStyleElement.StartPanel.PlaceListSeparator

示例

下面的代码示例演示如何使用 VisualStyleElement 属性返回的 Normal 创建 VisualStyleRenderer 。 若要运行此示例,请将其粘贴到 Windows 窗体中。 处理窗体的 Paint 事件,并从Paint事件处理方法调用 DrawVisualStyleElementStartPanelPlaceListSeparator1 方法,作为 ePaintEventArgs传递。

C#
public void DrawVisualStyleElementStartPanelPlaceListSeparator1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.StartPanel.PlaceListSeparator.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.StartPanel.PlaceListSeparator.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.StartPanel.PlaceListSeparator.Normal",
             this.Font, Brushes.Black, new Point(10, 10));
    }
    else
        e.Graphics.DrawString("This element is not defined in the current visual style.",
             this.Font, Brushes.Black, new Point(10, 10));
}

注解

Normal类的 VisualStyleElement.StartPanel.PlaceListSeparator 属性返回一个 VisualStyleElement ,它表示在“开始”菜单右侧分隔项目组的条。

属性

Normal

获取表示“开始”菜单右侧各项组的分隔条的视觉样式元素

适用于

产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

另请参阅