VisualStyleElement.Spin.DownHorizontal Klass
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Innehåller VisualStyleElement objekt för varje tillstånd för den vänsterriktade pilen för en rotationsknappskontroll (kallas även för en upp-ned-kontroll). Det går inte att ärva den här klassen.
public: ref class VisualStyleElement::Spin::DownHorizontal abstract sealed
public static class VisualStyleElement.Spin.DownHorizontal
type VisualStyleElement.Spin.DownHorizontal = class
Public Class VisualStyleElement.Spin.DownHorizontal
- Arv
-
VisualStyleElement.Spin.DownHorizontal
Exempel
I följande kodexempel visas hur du skapar en VisualStyleRenderer med den VisualStyleElement som returneras av Normal egenskapen. Om du vill köra det här exemplet klistrar du in det i ett Windows formulär. Hantera formulärets Paint händelse och anropa DrawVisualStyleElement_Spin_DownHorizontal1 metoden från Paint händelsehanteringsmetoden och skicka e som PaintEventArgs.
public void DrawVisualStyleElement_Spin_DownHorizontal1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.DownHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.DownHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.DownHorizontal.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 DrawVisualStyleElement_Spin_DownHorizontal1(ByVal e As PaintEventArgs)
If (VisualStyleRenderer.IsElementDefined( _
VisualStyleElement.Spin.DownHorizontal.Normal)) Then
Dim renderer As New VisualStyleRenderer _
(VisualStyleElement.Spin.DownHorizontal.Normal)
Dim rectangle1 As New Rectangle(10, 50, 50, 50)
renderer.DrawBackground(e.Graphics, rectangle1)
e.Graphics.DrawString("VisualStyleElement.Spin.DownHorizontal.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
Kommentarer
Varje egenskap i VisualStyleElement.Spin.DownHorizontal klassen returnerar en VisualStyleElement för ett annat tillstånd för vänsterpilen för en rotationsknapp.
Egenskaper
| Name | Description |
|---|---|
| Disabled |
Hämtar ett visuellt formatelement som representerar en vänsterriktad rotationsknapppil i inaktiverat tillstånd. |
| Hot |
Hämtar ett visuellt formatelement som representerar en vänsterriktad rotationsknapppil i hett tillstånd. |
| Normal |
Hämtar ett visuellt formatelement som representerar en vänsterriktad rotationsknapppil i normalt tillstånd. |
| Pressed |
Hämtar ett visuellt formatelement som representerar en vänsterriktad rotationsknapppil i nedtryckt tillstånd. |