VisualStyleElement.ExplorerBar.SpecialGroupBackground Класс

Определение

Обеспечивает VisualStyleElement для фона специальной группы элементов в панели обозревателя. Этот класс не наследуется.

public: ref class VisualStyleElement::ExplorerBar::SpecialGroupBackground abstract sealed
public static class VisualStyleElement.ExplorerBar.SpecialGroupBackground
type VisualStyleElement.ExplorerBar.SpecialGroupBackground = class
Public Class VisualStyleElement.ExplorerBar.SpecialGroupBackground
Наследование
VisualStyleElement.ExplorerBar.SpecialGroupBackground

Примеры

В следующем примере кода показано, как создать VisualStyleRenderer объект с VisualStyleElement возвращаемым свойством Normal . Чтобы запустить этот пример, вставьте его в Форму Windows Forms. Обработайте событие формы Paint и вызовите DrawVisualStyleElementExplorerBarSpecialGroupBackground1 метод из Paint метода обработки событий, передавая e как PaintEventArgs.

public void DrawVisualStyleElementExplorerBarSpecialGroupBackground1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupBackground.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));
}
Public Sub DrawVisualStyleElementExplorerBarSpecialGroupBackground1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal", _
          Me.Font, Brushes.Black, New Point(10, 10))
    Else
        e.Graphics.DrawString("This element is not defined in the current visual style.", _
          Me.Font, Brushes.Black, New Point(10, 10))
    End If
End Sub

Комментарии

Свойство NormalVisualStyleElement.ExplorerBar.SpecialGroupBackground класса получает объект , VisualStyleElement представляющий фон специальной группы элементов на панели Обозреватель, например группы "Задачи музыки" в Windows Обозреватель.

Свойства

Normal

Возвращает элемент визуального стиля, представляющий фоновый режим специальной группы элементов в строке обозревателя.

Применяется к

См. также раздел