Bagikan melalui


VisualStyleElement.ExplorerBar.SpecialGroupCollapse Kelas

Definisi

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

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

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 DrawVisualStyleElementExplorerBarSpecialGroupCollapse1 metode dari Paint metode penanganan peristiwa, meneruskan e sebagai PaintEventArgs.

public void DrawVisualStyleElementExplorerBarSpecialGroupCollapse1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupCollapse.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 DrawVisualStyleElementExplorerBarSpecialGroupCollapse1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupCollapse.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.SpecialGroupCollapse kelas mendapatkan VisualStyleElement status tombol ciutkan 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 ciutkan panas dari sekelompok item khusus di Bilah Penjelajah.

Normal

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

Pressed

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

Berlaku untuk

Lihat juga