VisualStyleElement.StartPanel.ProgListSeparator 类

定义

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

public static class VisualStyleElement.StartPanel.ProgListSeparator
继承
VisualStyleElement.StartPanel.ProgListSeparator

示例

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

public void DrawVisualStyleElementStartPanelProgListSeparator1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.StartPanel.ProgListSeparator.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.StartPanel.ProgListSeparator.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.StartPanel.ProgListSeparator.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.ProgListSeparator 属性返回一个 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

另请参阅