VisualStyleElement.ExplorerBar.SpecialGroupExpand クラス

定義

エクスプローラー バーの項目の特殊なグループの展開ボタンの状態ごとに、 VisualStyleElement オブジェクトを提供します。 このクラスは継承できません。

public: ref class VisualStyleElement::ExplorerBar::SpecialGroupExpand abstract sealed
public static class VisualStyleElement.ExplorerBar.SpecialGroupExpand
type VisualStyleElement.ExplorerBar.SpecialGroupExpand = class
Public Class VisualStyleElement.ExplorerBar.SpecialGroupExpand
継承
VisualStyleElement.ExplorerBar.SpecialGroupExpand

次のコード例では、VisualStyleRenderer プロパティによって返されるVisualStyleElementを使用してNormalを作成する方法を示します。 この例を実行するには、Windows フォームに貼り付けます。 フォームのPaint イベントを処理し、DrawVisualStyleElementExplorerBarSpecialGroupExpand1 イベント処理メソッドからPaint メソッドを呼び出し、ePaintEventArgsとして渡します。

public void DrawVisualStyleElementExplorerBarSpecialGroupExpand1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.ExplorerBar.SpecialGroupExpand.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupExpand.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupExpand.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 DrawVisualStyleElementExplorerBarSpecialGroupExpand1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.ExplorerBar.SpecialGroupExpand.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.ExplorerBar.SpecialGroupExpand.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupExpand.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

注釈

VisualStyleElement.ExplorerBar.SpecialGroupExpand クラスの各プロパティは、エクスプローラー のVisualStyleElement グループなど、エクスプローラー バーの項目の特殊なグループの展開ボタンの異なる状態のを取得します。

プロパティ

名前 説明
Hot

エクスプローラー バーの項目の特殊なグループのホット 展開ボタンを表す visual スタイル要素を取得します。

Normal

エクスプローラー バーの項目の特別なグループの通常の展開ボタンを表す visual スタイル要素を取得します。

Pressed

エクスプローラー バーの項目の特殊なグループの押された展開ボタンを表す visual スタイル要素を取得します。

適用対象

こちらもご覧ください