Bagikan melalui


VisualStyleElement.ExplorerBar.SpecialGroupExpand Kelas

Definisi

Menyediakan VisualStyleElement objek untuk setiap status tombol perluas dari grup item khusus di Bilah Penjelajah. Kelas ini tidak dapat diwariskan.

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

Contoh

Contoh kode berikut menunjukkan cara membuat VisualStyleRenderer dengan yang VisualStyleElement dikembalikan oleh Normal properti . Untuk menjalankan contoh ini, tempelkan ke dalam Formulir Windows. Tangani peristiwa formulir Paint dan panggil DrawVisualStyleElementExplorerBarSpecialGroupExpand1 metode dari Paint metode penanganan peristiwa, meneruskan e sebagai PaintEventArgs.

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

Keterangan

Setiap properti VisualStyleElement.ExplorerBar.SpecialGroupExpand kelas mendapatkan VisualStyleElement status tombol perluas yang berbeda dari grup item khusus di Bilah Penjelajah, seperti grup Tugas Musik di Windows Explorer.

Properti

Hot

Mendapatkan elemen gaya visual yang mewakili tombol perluas panas dari sekelompok item khusus di Bilah Penjelajah.

Normal

Mendapatkan elemen gaya visual yang mewakili tombol perluas normal dari sekelompok item khusus di Bilah Penjelajah.

Pressed

Mendapatkan elemen gaya visual yang mewakili tombol perluas yang ditekan dari grup item khusus di Bilah Penjelajah.

Berlaku untuk

Lihat juga