0% found this document useful (0 votes)
57 views

System - Windows.Forms - VisualStyles Namespace

This document contains a list of elements and properties related to visual styles in Windows Forms. It defines elements for common controls like buttons, checkboxes, menus, scrollbars, toolbars, and windows. For each element, it specifies the different visual states like normal, hot, pressed, and disabled.

Uploaded by

shandiezz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

System - Windows.Forms - VisualStyles Namespace

This document contains a list of elements and properties related to visual styles in Windows Forms. It defines elements for common controls like buttons, checkboxes, menus, scrollbars, toolbars, and windows. For each element, it specifies the different visual states like normal, hot, pressed, and disabled.

Uploaded by

shandiezz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 854

Contents

System.Windows.Forms.VisualStyles
BackgroundType
BooleanProperty
BorderType
CheckBoxState
ColorProperty
ComboBoxState
ContentAlignment
EdgeEffects
Edges
EdgeStyle
EnumProperty
FilenameProperty
FillType
FontProperty
GlyphFontSizingType
GlyphType
GroupBoxState
HitTestCode
HitTestOptions
HorizontalAlign
IconEffect
ImageOrientation
ImageSelectType
IntegerProperty
MarginProperty
OffsetType
PointProperty
PushButtonState
RadioButtonState
ScrollBarArrowButtonState
ScrollBarSizeBoxState
ScrollBarState
SizingType
StringProperty
TabItemState
TextBoxState
TextMetrics
Ascent
AverageCharWidth
BreakChar
CharSet
DefaultChar
Descent
DigitizedAspectX
DigitizedAspectY
ExternalLeading
FirstChar
Height
InternalLeading
Italic
LastChar
MaxCharWidth
Overhang
PitchAndFamily
StruckOut
Underlined
Weight
TextMetricsCharacterSet
TextMetricsPitchAndFamilyValues
TextShadowType
ThemeSizeType
ToolBarState
TrackBarThumbState
TrueSizeScalingType
VerticalAlignment
VisualStyleElement
ClassName
CreateElement
Part
State
VisualStyleElement.Button
VisualStyleElement.Button.CheckBox
CheckedDisabled
CheckedHot
CheckedNormal
CheckedPressed
MixedDisabled
MixedHot
MixedNormal
MixedPressed
UncheckedDisabled
UncheckedHot
UncheckedNormal
UncheckedPressed
VisualStyleElement.Button.GroupBox
Disabled
Normal
VisualStyleElement.Button.PushButton
Default
Disabled
Hot
Normal
Pressed
VisualStyleElement.Button.RadioButton
CheckedDisabled
CheckedHot
CheckedNormal
CheckedPressed
UncheckedDisabled
UncheckedHot
UncheckedNormal
UncheckedPressed
VisualStyleElement.Button.UserButton
Normal
VisualStyleElement.ComboBox
VisualStyleElement.ComboBox.DropDownButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.ExplorerBar
VisualStyleElement.ExplorerBar.HeaderBackground
Normal
VisualStyleElement.ExplorerBar.HeaderClose
Hot
Normal
Pressed
VisualStyleElement.ExplorerBar.HeaderPin
Hot
Normal
Pressed
SelectedHot
SelectedNormal
SelectedPressed
VisualStyleElement.ExplorerBar.IEBarMenu
Hot
Normal
Pressed
VisualStyleElement.ExplorerBar.NormalGroupBackground
Normal
VisualStyleElement.ExplorerBar.NormalGroupCollapse
Hot
Normal
Pressed
VisualStyleElement.ExplorerBar.NormalGroupExpand
Hot
Normal
Pressed
VisualStyleElement.ExplorerBar.NormalGroupHead
Normal
VisualStyleElement.ExplorerBar.SpecialGroupBackground
Normal
VisualStyleElement.ExplorerBar.SpecialGroupCollapse
Hot
Normal
Pressed
VisualStyleElement.ExplorerBar.SpecialGroupExpand
Hot
Normal
Pressed
VisualStyleElement.ExplorerBar.SpecialGroupHead
Normal
VisualStyleElement.Header
VisualStyleElement.Header.Item
Hot
Normal
Pressed
VisualStyleElement.Header.ItemLeft
Hot
Normal
Pressed
VisualStyleElement.Header.ItemRight
Hot
Normal
Pressed
VisualStyleElement.Header.SortArrow
SortedDown
SortedUp
VisualStyleElement.ListView
VisualStyleElement.ListView.Detail
Normal
VisualStyleElement.ListView.EmptyText
Normal
VisualStyleElement.ListView.Group
Normal
VisualStyleElement.ListView.Item
Disabled
Hot
Normal
Selected
SelectedNotFocus
VisualStyleElement.ListView.SortedDetail
Normal
VisualStyleElement.Menu
VisualStyleElement.Menu.BarDropDown
Normal
VisualStyleElement.Menu.BarItem
Normal
VisualStyleElement.Menu.Chevron
Normal
VisualStyleElement.Menu.DropDown
Normal
VisualStyleElement.Menu.Item
Demoted
Normal
Selected
VisualStyleElement.Menu.Separator
Normal
VisualStyleElement.MenuBand
VisualStyleElement.MenuBand.NewApplicationButton
Checked
Disabled
Hot
HotChecked
Normal
Pressed
VisualStyleElement.MenuBand.Separator
Normal
VisualStyleElement.Page
VisualStyleElement.Page.Down
Disabled
Hot
Normal
Pressed
VisualStyleElement.Page.DownHorizontal
Disabled
Hot
Normal
Pressed
VisualStyleElement.Page.Up
Disabled
Disabled
Hot
Normal
Pressed
VisualStyleElement.Page.UpHorizontal
Disabled
Hot
Normal
Pressed
VisualStyleElement.ProgressBar
VisualStyleElement.ProgressBar.Bar
Normal
VisualStyleElement.ProgressBar.BarVertical
Normal
VisualStyleElement.ProgressBar.Chunk
Normal
VisualStyleElement.ProgressBar.ChunkVertical
Normal
VisualStyleElement.Rebar
VisualStyleElement.Rebar.Band
Normal
VisualStyleElement.Rebar.Chevron
Hot
Normal
Pressed
VisualStyleElement.Rebar.ChevronVertical
Hot
Normal
Pressed
VisualStyleElement.Rebar.Gripper
Normal
VisualStyleElement.Rebar.GripperVertical
Normal
VisualStyleElement.ScrollBar
VisualStyleElement.ScrollBar.ArrowButton
DownDisabled
DownHot
DownNormal
DownPressed
LeftDisabled
LeftHot
LeftNormal
LeftPressed
RightDisabled
RightHot
RightNormal
RightPressed
UpDisabled
UpHot
UpNormal
UpPressed
VisualStyleElement.ScrollBar.GripperHorizontal
Normal
VisualStyleElement.ScrollBar.GripperVertical
Normal
VisualStyleElement.ScrollBar.LeftTrackHorizontal
Disabled
Hot
Normal
Pressed
VisualStyleElement.ScrollBar.LowerTrackVertical
Disabled
Hot
Normal
Pressed
VisualStyleElement.ScrollBar.RightTrackHorizontal
Disabled
Hot
Normal
Pressed
VisualStyleElement.ScrollBar.SizeBox
LeftAlign
RightAlign
VisualStyleElement.ScrollBar.ThumbButtonHorizontal
Disabled
Hot
Normal
Pressed
VisualStyleElement.ScrollBar.ThumbButtonVertical
Disabled
Hot
Normal
Pressed
VisualStyleElement.ScrollBar.UpperTrackVertical
Disabled
Hot
Normal
Pressed
VisualStyleElement.Spin
VisualStyleElement.Spin.Down
Disabled
Hot
Normal
Pressed
VisualStyleElement.Spin.DownHorizontal
Disabled
Hot
Normal
Pressed
VisualStyleElement.Spin.Up
Disabled
Hot
Normal
Pressed
VisualStyleElement.Spin.UpHorizontal
Disabled
Hot
Normal
Pressed
VisualStyleElement.StartPanel
VisualStyleElement.StartPanel.LogOff
Normal
VisualStyleElement.StartPanel.LogOffButtons
Hot
Normal
Pressed
VisualStyleElement.StartPanel.MorePrograms
Normal
VisualStyleElement.StartPanel.MoreProgramsArrow
Hot
Normal
Pressed
VisualStyleElement.StartPanel.PlaceList
Normal
VisualStyleElement.StartPanel.PlaceListSeparator
Normal
VisualStyleElement.StartPanel.Preview
Normal
VisualStyleElement.StartPanel.ProgList
Normal
Normal
VisualStyleElement.StartPanel.ProgListSeparator
Normal
VisualStyleElement.StartPanel.UserPane
Normal
VisualStyleElement.StartPanel.UserPicture
Normal
VisualStyleElement.Status
VisualStyleElement.Status.Bar
Normal
VisualStyleElement.Status.Gripper
Normal
VisualStyleElement.Status.GripperPane
Normal
VisualStyleElement.Status.Pane
Normal
VisualStyleElement.Tab
VisualStyleElement.Tab.Body
Normal
VisualStyleElement.Tab.Pane
Normal
VisualStyleElement.Tab.TabItem
Disabled
Hot
Normal
Pressed
VisualStyleElement.Tab.TabItemBothEdges
Normal
VisualStyleElement.Tab.TabItemLeftEdge
Disabled
Hot
Normal
Pressed
VisualStyleElement.Tab.TabItemRightEdge
Disabled
Hot
Normal
Pressed
VisualStyleElement.Tab.TopTabItem
Disabled
Hot
Normal
Pressed
VisualStyleElement.Tab.TopTabItemBothEdges
Normal
VisualStyleElement.Tab.TopTabItemLeftEdge
Disabled
Hot
Normal
Pressed
VisualStyleElement.Tab.TopTabItemRightEdge
Disabled
Hot
Normal
Pressed
VisualStyleElement.TaskBand
VisualStyleElement.TaskBand.FlashButton
Normal
VisualStyleElement.TaskBand.FlashButtonGroupMenu
Normal
VisualStyleElement.TaskBand.GroupCount
Normal
VisualStyleElement.Taskbar
VisualStyleElement.Taskbar.BackgroundBottom
Normal
VisualStyleElement.Taskbar.BackgroundLeft
Normal
VisualStyleElement.Taskbar.BackgroundRight
Normal
VisualStyleElement.Taskbar.BackgroundTop
Normal
VisualStyleElement.Taskbar.SizingBarBottom
Normal
VisualStyleElement.Taskbar.SizingBarLeft
Normal
VisualStyleElement.Taskbar.SizingBarRight
Normal
VisualStyleElement.Taskbar.SizingBarTop
Normal
VisualStyleElement.TaskbarClock
VisualStyleElement.TaskbarClock.Time
Normal
VisualStyleElement.TextBox
VisualStyleElement.TextBox.Caret
Normal
VisualStyleElement.TextBox.TextEdit
Assist
Disabled
Focused
Hot
Normal
ReadOnly
Selected
VisualStyleElement.ToolBar
VisualStyleElement.ToolBar.Button
Checked
Disabled
Hot
HotChecked
Normal
Pressed
VisualStyleElement.ToolBar.DropDownButton
Checked
Disabled
Hot
HotChecked
Normal
Pressed
VisualStyleElement.ToolBar.SeparatorHorizontal
Normal
VisualStyleElement.ToolBar.SeparatorVertical
Normal
VisualStyleElement.ToolBar.SplitButton
Checked
Disabled
Hot
HotChecked
Normal
Pressed
VisualStyleElement.ToolBar.SplitButtonDropDown
Checked
Disabled
Hot
HotChecked
Normal
Pressed
VisualStyleElement.ToolTip
VisualStyleElement.ToolTip.Balloon
Link
Normal
VisualStyleElement.ToolTip.BalloonTitle
Normal
VisualStyleElement.ToolTip.Close
Hot
Normal
Pressed
VisualStyleElement.ToolTip.Standard
Link
Normal
VisualStyleElement.ToolTip.StandardTitle
Normal
VisualStyleElement.TrackBar
VisualStyleElement.TrackBar.Thumb
Disabled
Focused
Hot
Normal
Pressed
VisualStyleElement.TrackBar.ThumbBottom
Disabled
Focused
Hot
Normal
Pressed
VisualStyleElement.TrackBar.ThumbLeft
Disabled
Focused
Hot
Normal
Pressed
VisualStyleElement.TrackBar.ThumbRight
Disabled
Disabled
Focused
Hot
Normal
Pressed
VisualStyleElement.TrackBar.ThumbTop
Disabled
Focused
Hot
Normal
Pressed
VisualStyleElement.TrackBar.ThumbVertical
Disabled
Focused
Hot
Normal
Pressed
VisualStyleElement.TrackBar.Ticks
Normal
VisualStyleElement.TrackBar.TicksVertical
Normal
VisualStyleElement.TrackBar.Track
Normal
VisualStyleElement.TrackBar.TrackVertical
Normal
VisualStyleElement.TrayNotify
VisualStyleElement.TrayNotify.AnimateBackground
Normal
VisualStyleElement.TrayNotify.Background
Normal
VisualStyleElement.TreeView
VisualStyleElement.TreeView.Branch
Normal
VisualStyleElement.TreeView.Glyph
Closed
Opened
VisualStyleElement.TreeView.Item
Disabled
Hot
Normal
Selected
SelectedNotFocus
VisualStyleElement.Window
VisualStyleElement.Window.Caption
Active
Disabled
Inactive
VisualStyleElement.Window.CaptionSizingTemplate
Normal
VisualStyleElement.Window.CloseButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.Dialog
Normal
VisualStyleElement.Window.FrameBottom
Active
Inactive
VisualStyleElement.Window.FrameBottomSizingTemplate
Normal
VisualStyleElement.Window.FrameLeft
Active
Inactive
VisualStyleElement.Window.FrameLeftSizingTemplate
Normal
Normal
VisualStyleElement.Window.FrameRight
Active
Inactive
VisualStyleElement.Window.FrameRightSizingTemplate
Normal
VisualStyleElement.Window.HelpButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.HorizontalScroll
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.HorizontalThumb
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MaxButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MaxCaption
Active
Disabled
Inactive
VisualStyleElement.Window.MdiCloseButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MdiHelpButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MdiMinButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MdiRestoreButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MdiSysButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MinButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.MinCaption
Active
Disabled
Inactive
VisualStyleElement.Window.RestoreButton
Disabled
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.SmallCaption
Active
Disabled
Inactive
VisualStyleElement.Window.SmallCaptionSizingTemplate
Normal
VisualStyleElement.Window.SmallCloseButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.SmallFrameBottom
Active
Inactive
VisualStyleElement.Window.SmallFrameBottomSizingTemplate
Normal
VisualStyleElement.Window.SmallFrameLeft
Active
Inactive
VisualStyleElement.Window.SmallFrameLeftSizingTemplate
Normal
VisualStyleElement.Window.SmallFrameRight
Active
Inactive
VisualStyleElement.Window.SmallFrameRightSizingTemplate
Normal
VisualStyleElement.Window.SmallMaxCaption
Active
Disabled
Inactive
VisualStyleElement.Window.SmallMinCaption
Active
Disabled
Inactive
VisualStyleElement.Window.SysButton
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.VerticalScroll
Disabled
Hot
Normal
Pressed
VisualStyleElement.Window.VerticalThumb
Disabled
Hot
Normal
Pressed
VisualStyleInformation
Author
ColorScheme
Company
ControlHighlightHot
Copyright
Description
DisplayName
IsEnabledByUser
IsSupportedByOS
MinimumColorDepth
Size
SupportsFlatMenus
TextControlBorder
Url
Version
VisualStyleRenderer
Class
DrawBackground
DrawEdge
DrawImage
DrawParentBackground
DrawText
GetBackgroundContentRectangle
GetBackgroundExtent
GetBackgroundRegion
GetBoolean
GetColor
GetEnumValue
GetFilename
GetFont
GetInteger
GetMargins
GetPartSize
GetPoint
GetString
GetTextExtent
GetTextMetrics
Handle
HitTestBackground
IsBackgroundPartiallyTransparent
IsElementDefined
IsSupported
LastHResult
Part
SetParameters
State
VisualStyleRenderer
VisualStyleState
System.Windows.Forms.VisualStyles Namespace
The System.Windows.Forms.VisualStyles namespace contains classes for rendering controls and other Windows user
interface (UI) elements with visual styles in operating systems that support them.

Introduction
The System.Windows.Forms.VisualStyles namespace contains the following main classes:
VisualStyleElement is a foundation class for identifying any control or UI element supported by visual styles. In
addition to VisualStyleElement itself, the System.Windows.Forms.VisualStyles namespace includes many nested
classes of VisualStyleElement with static properties that return a VisualStyleElement for every state of a control,
control part, or other UI element supported by visual styles. For example, the Pressed property of the
VisualStyleElement.Button.PushButton class returns a VisualStyleElement that identifies a button in the pressed state
with visual styles.
VisualStyleRenderer provides methods that draw and get information about each VisualStyleElement defined by the
current visual style of the operating system. Information that can be retrieved about an element includes its default
size, background type, and color definitions.
VisualStyleInformation provides a set of static properties that provide information about the current visual style of
the operating system.
The System.Windows.Forms.VisualStyles namespace also includes a set of enumerations. Some of these enumerations,
such as PushButtonState and ComboBoxState, provide state definitions for related visual style elements. Most of the
other enumerations support VisualStyleRenderer methods that return information about a particular element. For
example, the EnumProperty enumeration provides the possible argument values for the GetEnumValue method.
Finally, the VisualStyleState enumeration provides values that define how visual styles are currently applied to the
application.

Classes
VisualStyleElement
Identifies a control or user interface (UI) element that is drawn
with visual styles.

VisualStyleElement.Button
Contains classes that provide VisualStyleElement objects for
button-related controls. This class cannot be inherited.

VisualStyleElement.Button.CheckBox
Provides VisualStyleElement objects for the different states of
the check box control. This class cannot be inherited.

VisualStyleElement.Button.GroupBox
Provides VisualStyleElement objects for the different states of
the group box control. This class cannot be inherited.

VisualStyleElement.Button.PushButton
Provides VisualStyleElement objects for the different states of
the button control. This class cannot be inherited.
VisualStyleElement.Button.RadioButton
Provides VisualStyleElement objects for the different states of
the radio button control. This class cannot be inherited.

VisualStyleElement.Button.UserButton
Provides a VisualStyleElement for a user button. This class
cannot be inherited.

VisualStyleElement.ComboBox
Contains a class that provides VisualStyleElement objects for
the drop-down arrow of the combo box control. This class
cannot be inherited.

VisualStyleElement.ComboBox.DropDownButton
Provides VisualStyleElement objects for the different states of
the drop-down arrow of the combo box control. This class
cannot be inherited.

VisualStyleElement.ExplorerBar
Contains classes that provide VisualStyleElement objects for
each part of the Explorer Bar. This class cannot be inherited.

VisualStyleElement.ExplorerBar.HeaderBackground
Provides a VisualStyleElement for the background of the
Explorer Bar. This class cannot be inherited.

VisualStyleElement.ExplorerBar.HeaderClose
Provides VisualStyleElement objects for each state of the
Close button of the Explorer Bar. This class cannot be
inherited.

VisualStyleElement.ExplorerBar.HeaderPin
Provides VisualStyleElement objects for each state of the Auto
Hide button (which is displayed as a push pin) of the Explorer
Bar. This class cannot be inherited.

VisualStyleElement.ExplorerBar.IEBarMenu
Provides VisualStyleElement objects for each state of the
expanded-menu arrow of the Explorer Bar. This class cannot
be inherited.

VisualStyleElement.ExplorerBar.NormalGroupBackground
Provides a VisualStyleElement for the background of a
common group of items in the Explorer Bar. This class cannot
be inherited.

VisualStyleElement.ExplorerBar.NormalGroupCollapse
Provides VisualStyleElement objects for each state of the
collapse button of a common group of items in the Explorer
Bar. This class cannot be inherited.
VisualStyleElement.ExplorerBar.NormalGroupExpand
Provides VisualStyleElement objects for each state of the
expand button of a common group of items in the Explorer
Bar. This class cannot be inherited.

VisualStyleElement.ExplorerBar.NormalGroupHead
Provides a VisualStyleElement for the title bar of a common
group of items in the Explorer Bar. This class cannot be
inherited.

VisualStyleElement.ExplorerBar.SpecialGroupBackground
Provides a VisualStyleElement for the background of a special
group of items in the Explorer Bar. This class cannot be
inherited.

VisualStyleElement.ExplorerBar.SpecialGroupCollapse
Provides VisualStyleElement objects for each state of the
collapse button of a special group of items in the Explorer Bar.
This class cannot be inherited.

VisualStyleElement.ExplorerBar.SpecialGroupExpand
Provides VisualStyleElement objects for each state of the
expand button of a special group of items in the Explorer Bar.
This class cannot be inherited.

VisualStyleElement.ExplorerBar.SpecialGroupHead
Provides a VisualStyleElement for the title bar of a special
group of items in the Explorer Bar. This class cannot be
inherited.

VisualStyleElement.Header
Contains classes that provide VisualStyleElement objects for
each part of the header control. This class cannot be inherited.

VisualStyleElement.Header.Item
Provides VisualStyleElement objects for each state of an item
of the header control. This class cannot be inherited.

VisualStyleElement.Header.ItemLeft
Provides VisualStyleElement objects for each state of the
leftmost item of the header control. This class cannot be
inherited.

VisualStyleElement.Header.ItemRight
Provides VisualStyleElement objects for each state of the
rightmost item of the header control. This class cannot be
inherited.

VisualStyleElement.Header.SortArrow
Provides VisualStyleElement objects for the sort arrow of a
header item. This class cannot be inherited.
VisualStyleElement.ListView
Contains classes that provide VisualStyleElement objects for
the parts of the list view control. This class cannot be
inherited.

VisualStyleElement.ListView.Detail
Provides a VisualStyleElement for a list view in detail view. This
class cannot be inherited.

VisualStyleElement.ListView.EmptyText
Provides a VisualStyleElement for the text area of a list view
that contains no items. This class cannot be inherited.

VisualStyleElement.ListView.Group
Provides a VisualStyleElement for a list view item group. This
class cannot be inherited.

VisualStyleElement.ListView.Item
Provides VisualStyleElement objects for each state of an item
of the list view control. This class cannot be inherited.

VisualStyleElement.ListView.SortedDetail
Provides a VisualStyleElement for a sorted list view control in
detail view This class cannot be inherited.

VisualStyleElement.Menu
Contains classes that provide VisualStyleElement objects for
the parts of a menu. This class cannot be inherited.

VisualStyleElement.Menu.BarDropDown
Provides a VisualStyleElement for the drop-down arrow of a
menu bar. This class cannot be inherited.

VisualStyleElement.Menu.BarItem
Provides a VisualStyleElement for a menu bar item. This class
cannot be inherited.

VisualStyleElement.Menu.Chevron
Provides a VisualStyleElement for the chevron of a menu. This
class cannot be inherited.

VisualStyleElement.Menu.DropDown
Provides a VisualStyleElement for the drop-down arrow of a
menu. This class cannot be inherited.

VisualStyleElement.Menu.Item
Provides VisualStyleElement objects for each state of a menu
item. This class cannot be inherited.

VisualStyleElement.Menu.Separator
Provides a VisualStyleElement for a menu item separator. This
class cannot be inherited.
VisualStyleElement.MenuBand
Contains classes that provide VisualStyleElement objects for
the parts of a menu band. This class cannot be inherited.

VisualStyleElement.MenuBand.NewApplicationButton
Provides VisualStyleElement objects for each state of the new
application button of a menu band. This class cannot be
inherited.

VisualStyleElement.MenuBand.Separator
Provides a VisualStyleElement for a menu band separator. This
class cannot be inherited.

VisualStyleElement.Page
Contains classes that provide VisualStyleElement objects for
the parts of a page. This class cannot be inherited.

VisualStyleElement.Page.Down
Provides VisualStyleElement objects for each state of a down
indicator in an up-down or spin box control. This class cannot
be inherited.

VisualStyleElement.Page.DownHorizontal
Provides VisualStyleElement objects for each state of a page
backward indicator in a pager control. This class cannot be
inherited.

VisualStyleElement.Page.Up
Provides VisualStyleElement objects for each state of a page
up indicator of an up-down or spin box control. This class
cannot be inherited.

VisualStyleElement.Page.UpHorizontal
Provides VisualStyleElement objects for each state of a page
forward indicator of a pager control. This class cannot be
inherited.

VisualStyleElement.ProgressBar
Contains classes that provide VisualStyleElement objects for
the parts of the progress bar control. This class cannot be
inherited.

VisualStyleElement.ProgressBar.Bar
Provides a VisualStyleElement for the frame of a horizontal
progress bar. This class cannot be inherited.

VisualStyleElement.ProgressBar.BarVertical
Provides a VisualStyleElement for the frame of a vertical
progress bar. This class cannot be inherited.

VisualStyleElement.ProgressBar.Chunk
Provides a VisualStyleElement for the pieces that fill a
horizontal progress bar. This class cannot be inherited.
VisualStyleElement.ProgressBar.ChunkVertical
Provides a VisualStyleElement for the pieces that fill a vertical
progress bar. This class cannot be inherited.

VisualStyleElement.Rebar
Contains classes that provide VisualStyleElement objects for
the parts of the rebar control. This class cannot be inherited.

VisualStyleElement.Rebar.Band
Provides a VisualStyleElement for a rebar band. This class
cannot be inherited.

VisualStyleElement.Rebar.Chevron
Provides VisualStyleElement objects for each state of a
horizontal chevron. This class cannot be inherited.

VisualStyleElement.Rebar.ChevronVertical
Provides VisualStyleElement objects for each state of a
chevron. This class cannot be inherited.

VisualStyleElement.Rebar.Gripper
Provides a VisualStyleElement for the gripper bar of a
horizontal rebar control. This class cannot be inherited.

VisualStyleElement.Rebar.GripperVertical
Provides a VisualStyleElement for the gripper bar of a vertical
rebar. This class cannot be inherited.

VisualStyleElement.ScrollBar
Contains classes that provide VisualStyleElement objects for
the parts of the scroll bar control. This class cannot be
inherited.

VisualStyleElement.ScrollBar.ArrowButton
Provides VisualStyleElement objects for each state and
direction of a scroll arrow. This class cannot be inherited.

VisualStyleElement.ScrollBar.GripperHorizontal
Provides a VisualStyleElement for the grip of a horizontal scroll
box (also known as the thumb). This class cannot be inherited.

VisualStyleElement.ScrollBar.GripperVertical
Provides a VisualStyleElement for the grip of a vertical scroll
box (also known as the thumb). This class cannot be inherited.

VisualStyleElement.ScrollBar.LeftTrackHorizontal
Provides VisualStyleElement objects for each state of the left
part of a horizontal scroll bar track. This class cannot be
inherited.
VisualStyleElement.ScrollBar.LowerTrackVertical
Provides VisualStyleElement objects for each state of the lower
part of a vertical scroll bar track. This class cannot be
inherited.

VisualStyleElement.ScrollBar.RightTrackHorizontal
Provides VisualStyleElement objects for each state of the right
part of a horizontal scroll bar track. This class cannot be
inherited.

VisualStyleElement.ScrollBar.SizeBox
Provides VisualStyleElement objects for each state of the sizing
handle of a scroll bar. This class cannot be inherited.

VisualStyleElement.ScrollBar.ThumbButtonHorizontal
Provides VisualStyleElement objects for each state of a
horizontal scroll box (also known as the thumb). This class
cannot be inherited.

VisualStyleElement.ScrollBar.ThumbButtonVertical
Provides VisualStyleElement objects for each state of a vertical
scroll box (also known as the thumb). This class cannot be
inherited.

VisualStyleElement.ScrollBar.UpperTrackVertical
Provides VisualStyleElement objects for each state of the
upper part of a vertical scroll bar track. This class cannot be
inherited.

VisualStyleElement.Spin
Contains classes that provide VisualStyleElement objects for
the arrows of a spin button control (also known as an up-
down control). This class cannot be inherited.

VisualStyleElement.Spin.Down
Provides VisualStyleElement objects for each state of the
downward-pointing arrow for a spin button control (also
known as an up-down control). This class cannot be inherited.

VisualStyleElement.Spin.DownHorizontal
Provides VisualStyleElement objects for each state of the left-
pointing arrow for a spin button control (also known as an up-
down control). This class cannot be inherited.

VisualStyleElement.Spin.Up
Provides VisualStyleElement objects for each state of the
upward-pointing arrow for a spin button control (also known
as an up-down control). This class cannot be inherited.

VisualStyleElement.Spin.UpHorizontal
Provides VisualStyleElement objects for each state of the right-
pointing arrow for a spin button control (also known as an up-
down control). This class cannot be inherited.
VisualStyleElement.StartPanel
Contains classes that provide VisualStyleElement objects for
the parts of the Start menu. This class cannot be inherited.

VisualStyleElement.StartPanel.LogOff
Provides a VisualStyleElement for the bottom border of the
Start menu. This class cannot be inherited.

VisualStyleElement.StartPanel.LogOffButtons
Provides VisualStyleElement objects for each state of the Log
Off and Shut Down buttons in the Start menu. This class
cannot be inherited.

VisualStyleElement.StartPanel.MorePrograms
Provides a VisualStyleElement for the background of the All
Programs item in the Start menu. This class cannot be
inherited.

VisualStyleElement.StartPanel.MoreProgramsArrow
Provides VisualStyleElement objects for each state of the All
Programs arrow in the Start menu. This class cannot be
inherited.

VisualStyleElement.StartPanel.PlaceList
Provides a VisualStyleElement for the background of the right
side of the Start menu. This class cannot be inherited.

VisualStyleElement.StartPanel.PlaceListSeparator
Provides a VisualStyleElement for the bar that separates
groups of items in the right side of the Start menu. This class
cannot be inherited.

VisualStyleElement.StartPanel.Preview
Provides a VisualStyleElement for the preview area of the Start
menu. This class cannot be inherited.

VisualStyleElement.StartPanel.ProgList
Provides a VisualStyleElement for the background of the left
side of the Start menu. This class cannot be inherited.

VisualStyleElement.StartPanel.ProgListSeparator
Provides a VisualStyleElement for the bar that separates
groups of items in the left side of the Start menu. This class
cannot be inherited.

VisualStyleElement.StartPanel.UserPane
Provides a VisualStyleElement for the top border of the Start
menu. This class cannot be inherited.

VisualStyleElement.StartPanel.UserPicture
Provides a VisualStyleElement for the background of the user
picture on the Start menu. This class cannot be inherited.
VisualStyleElement.Status
Contains classes that provide VisualStyleElement objects for
the parts of the status bar. This class cannot be inherited.

VisualStyleElement.Status.Bar
Provides a VisualStyleElement for the background of the
status bar. This class cannot be inherited.

VisualStyleElement.Status.Gripper
Provides a VisualStyleElement for the grip of the status bar.
This class cannot be inherited.

VisualStyleElement.Status.GripperPane
Provides a VisualStyleElement for the pane of the grip in the
status bar. This class cannot be inherited.

VisualStyleElement.Status.Pane
Provides a VisualStyleElement for a status bar pane. This class
cannot be inherited.

VisualStyleElement.Tab
Contains classes that provide VisualStyleElement objects for
the parts of a tab control. This class cannot be inherited.

VisualStyleElement.Tab.Body
Provides a VisualStyleElement for the interior of a tab control
page. This class cannot be inherited.

VisualStyleElement.Tab.Pane
Provides a VisualStyleElement for the border of a tab control
page. This class cannot be inherited.

VisualStyleElement.Tab.TabItem
Provides VisualStyleElement objects for each state of a tab
control that shares its top, left, and right borders with other
tab controls. This class cannot be inherited.

VisualStyleElement.Tab.TabItemBothEdges
Provides a VisualStyleElement for a tab control that shares its
top border with another tab control. This class cannot be
inherited.

VisualStyleElement.Tab.TabItemLeftEdge
Provides VisualStyleElement objects for each state of a tab
control that shares its top and right borders with other tab
controls. This class cannot be inherited.

VisualStyleElement.Tab.TabItemRightEdge
Provides VisualStyleElement objects for each state of a tab
control that shares its top and left borders with other tab
controls. This class cannot be inherited.
VisualStyleElement.Tab.TopTabItem
Provides VisualStyleElement objects for each state of a tab
control that shares its bottom, left, and right borders with
other tab controls. This class cannot be inherited.

VisualStyleElement.Tab.TopTabItemBothEdges
Provides a VisualStyleElement for a tab control that shares its
bottom border with another tab control. This class cannot be
inherited.

VisualStyleElement.Tab.TopTabItemLeftEdge
Provides VisualStyleElement objects for each state of a tab
control that shares its bottom and right borders with other
tab controls. This class cannot be inherited.

VisualStyleElement.Tab.TopTabItemRightEdge
Provides VisualStyleElement objects for each state of a tab
control that shares its bottom and left borders with other tab
controls. This class cannot be inherited.

VisualStyleElement.TaskBand
Contains classes that provide VisualStyleElement objects for
parts of the taskbar. This class cannot be inherited.

VisualStyleElement.TaskBand.FlashButton
Provides a VisualStyleElement for a flashing window button in
the taskbar. This class cannot be inherited.

VisualStyleElement.TaskBand.FlashButtonGroupMenu
Provides a VisualStyleElement for a flashing menu item of a
window button in the taskbar. This class cannot be inherited.

VisualStyleElement.TaskBand.GroupCount
Provides a VisualStyleElement for a group counter of the
taskbar. This class cannot be inherited.

VisualStyleElement.Taskbar
Contains classes that provide VisualStyleElement objects for
the parts of the taskbar. This class cannot be inherited.

VisualStyleElement.Taskbar.BackgroundBottom
Provides a VisualStyleElement for the background of a taskbar
that is docked on the bottom of the screen. This class cannot
be inherited.

VisualStyleElement.Taskbar.BackgroundLeft
Provides a VisualStyleElement for the background of a taskbar
that is docked on the left side of the screen. This class cannot
be inherited.

VisualStyleElement.Taskbar.BackgroundRight
Provides a VisualStyleElement for the background of a taskbar
that is docked on the right side of the screen. This class cannot
be inherited.
VisualStyleElement.Taskbar.BackgroundTop
Provides a VisualStyleElement for the background of a taskbar
that is docked on the top of the screen. This class cannot be
inherited.

VisualStyleElement.Taskbar.SizingBarBottom
Provides a VisualStyleElement for the sizing bar of a taskbar
that is docked on the bottom of the screen. This class cannot
be inherited.

VisualStyleElement.Taskbar.SizingBarLeft
Provides a VisualStyleElement for the sizing bar of a taskbar
that is docked on the left side of the screen. This class cannot
be inherited.

VisualStyleElement.Taskbar.SizingBarRight
Provides a VisualStyleElement for the sizing bar of a taskbar
that is docked on the right side of the screen. This class cannot
be inherited.

VisualStyleElement.Taskbar.SizingBarTop
Provides a VisualStyleElement for the sizing bar of a taskbar
that is docked on the top of the screen. This class cannot be
inherited.

VisualStyleElement.TaskbarClock
Contains a class that provides a VisualStyleElement for the
background of the taskbar clock. This class cannot be
inherited.

VisualStyleElement.TaskbarClock.Time
Provides a VisualStyleElement for the background of the
taskbar clock. This class cannot be inherited.

VisualStyleElement.TextBox
Contains classes that provide VisualStyleElement objects for
the parts of a text box. This class cannot be inherited.

VisualStyleElement.TextBox.Caret
Provides a VisualStyleElement for the caret of a text box. This
class cannot be inherited.

VisualStyleElement.TextBox.TextEdit
Provides VisualStyleElement objects for each state of a text
box. This class cannot be inherited.

VisualStyleElement.ToolBar
Contains classes that provide VisualStyleElement objects for
the parts of a toolbar. This class cannot be inherited.

VisualStyleElement.ToolBar.Button
Provides VisualStyleElement objects for each state of a toolbar
button. This class cannot be inherited.
VisualStyleElement.ToolBar.DropDownButton
Provides VisualStyleElement objects for each state of a drop-
down toolbar button. This class cannot be inherited.

VisualStyleElement.ToolBar.SeparatorHorizontal
Provides a VisualStyleElement for a horizontal separator of the
toolbar. This class cannot be inherited.

VisualStyleElement.ToolBar.SeparatorVertical
Provides a VisualStyleElement for a vertical separator of the
toolbar. This class cannot be inherited.

VisualStyleElement.ToolBar.SplitButton
Provides VisualStyleElement objects for each state of the
regular button portion of a combined regular button and
drop-down button. This class cannot be inherited.

VisualStyleElement.ToolBar.SplitButtonDropDown
Provides VisualStyleElement objects for each state of the drop-
down portion of a combined regular button and drop-down
button. This class cannot be inherited.

VisualStyleElement.ToolTip
Contains classes that provide VisualStyleElement objects for
the parts of a ToolTip. This class cannot be inherited.

VisualStyleElement.ToolTip.Balloon
Provides VisualStyleElement objects for a balloon ToolTip. This
class cannot be inherited.

VisualStyleElement.ToolTip.BalloonTitle
Provides a VisualStyleElement for the title area of a balloon
ToolTip. This class cannot be inherited.

VisualStyleElement.ToolTip.Close
Provides VisualStyleElement objects for each state of the
Close button of a ToolTip. This class cannot be inherited.

VisualStyleElement.ToolTip.Standard
Provides VisualStyleElement objects for a standard ToolTip.
This class cannot be inherited.

VisualStyleElement.ToolTip.StandardTitle
Provides a VisualStyleElement for the title area of a standard
ToolTip. This class cannot be inherited.

VisualStyleElement.TrackBar
Contains classes that provide VisualStyleElement objects for
the parts of the track bar control. This class cannot be
inherited.
VisualStyleElement.TrackBar.Thumb
Provides VisualStyleElement objects for each state of the slider
(also known as the thumb) of a horizontal track bar. This class
cannot be inherited.

VisualStyleElement.TrackBar.ThumbBottom
Provides VisualStyleElement objects for each state of the
downward-pointing track bar slider (also known as the
thumb). This class cannot be inherited.

VisualStyleElement.TrackBar.ThumbLeft
Provides VisualStyleElement objects for each state of the left-
pointing track bar slider (also known as the thumb). This class
cannot be inherited.

VisualStyleElement.TrackBar.ThumbRight
Provides VisualStyleElement objects for each state of the right-
pointing track bar slider (also known as the thumb). This class
cannot be inherited.

VisualStyleElement.TrackBar.ThumbTop
Provides VisualStyleElement objects for each state of the
upward-pointing track bar slider (also known as the thumb).
This class cannot be inherited.

VisualStyleElement.TrackBar.ThumbVertical
Provides VisualStyleElement objects for each state of the slider
(also known as the thumb) of a vertical track bar. This class
cannot be inherited.

VisualStyleElement.TrackBar.Ticks
Provides a VisualStyleElement for a single tick of a horizontal
track bar. This class cannot be inherited.

VisualStyleElement.TrackBar.TicksVertical
Provides a VisualStyleElement for a single tick of a vertical
track bar. This class cannot be inherited.

VisualStyleElement.TrackBar.Track
Provides a VisualStyleElement for the track for a horizontal
track bar. This class cannot be inherited.

VisualStyleElement.TrackBar.TrackVertical
Provides a VisualStyleElement for the track for a vertical track
bar. This class cannot be inherited.

VisualStyleElement.TrayNotify
Contains classes that provide VisualStyleElement objects for
the background of the notification area, which is located at the
far right of the taskbar. This class cannot be inherited.

VisualStyleElement.TrayNotify.AnimateBackground
Provides a VisualStyleElement for an animated background of
the notification area. This class cannot be inherited.
VisualStyleElement.TrayNotify.Background
Provides a VisualStyleElement for the background of the
notification area. This class cannot be inherited.

VisualStyleElement.TreeView
Contains classes that provide VisualStyleElement objects for
the parts of the tree view control. This class cannot be
inherited.

VisualStyleElement.TreeView.Branch
Provides a VisualStyleElement for a tree view branch. This class
cannot be inherited.

VisualStyleElement.TreeView.Glyph
Provides VisualStyleElement objects for the plus sign (+) and
minus sign (-) buttons of a tree view control. This class cannot
be inherited.

VisualStyleElement.TreeView.Item
Provides VisualStyleElement objects for each state of a tree
view item. This class cannot be inherited.

VisualStyleElement.Window
Contains classes that provide VisualStyleElement objects for
the parts of a window. This class cannot be inherited.

VisualStyleElement.Window.Caption
Provides VisualStyleElement objects for each state of the title
bar of a window. This class cannot be inherited.

VisualStyleElement.Window.CaptionSizingTemplate
Provides a VisualStyleElement that represents the sizing
template of the title bar of a window. This class cannot be
inherited.

VisualStyleElement.Window.CloseButton
Provides VisualStyleElement objects for each state of the
Close button of a window. This class cannot be inherited.

VisualStyleElement.Window.Dialog
Provides a VisualStyleElement for the background of a dialog
box. This class cannot be inherited.

VisualStyleElement.Window.FrameBottom
Provides VisualStyleElement objects for each state of the
bottom border of a window. This class cannot be inherited.

VisualStyleElement.Window.FrameBottomSizingTemplate
Provides a VisualStyleElement that represents the sizing
template of the bottom border of a window. This class cannot
be inherited.
VisualStyleElement.Window.FrameLeft
Provides VisualStyleElement objects for each state of the left
border of a window. This class cannot be inherited.

VisualStyleElement.Window.FrameLeftSizingTemplate
Provides a VisualStyleElement that represents the sizing
template of the left border of a window. This class cannot be
inherited.

VisualStyleElement.Window.FrameRight
Provides VisualStyleElement objects for each state of the right
border of a window. This class cannot be inherited.

VisualStyleElement.Window.FrameRightSizingTemplate
Provides a VisualStyleElement that represents the sizing
template of the right border of a window. This class cannot be
inherited.

VisualStyleElement.Window.HelpButton
Provides VisualStyleElement objects for each state of the Help
button of a window or dialog box. This class cannot be
inherited.

VisualStyleElement.Window.HorizontalScroll
Provides VisualStyleElement objects for each state of the
horizontal scroll bar of a window. This class cannot be
inherited.

VisualStyleElement.Window.HorizontalThumb
Provides VisualStyleElement objects for each state of the
horizontal scroll box (also known as the thumb) of a window.
This class cannot be inherited.

VisualStyleElement.Window.MaxButton
Provides VisualStyleElement objects for each state of the
Maximize button of a window. This class cannot be inherited.

VisualStyleElement.Window.MaxCaption
Provides VisualStyleElement objects for each state of the title
bar of a maximized window. This class cannot be inherited.

VisualStyleElement.Window.MdiCloseButton
Provides VisualStyleElement objects for each state of the
Close button of a multiple-document interface (MDI) child
window. This class cannot be inherited.

VisualStyleElement.Window.MdiHelpButton
Provides VisualStyleElement objects for each state of the Help
button of a multiple-document interface (MDI) child window.
This class cannot be inherited.
VisualStyleElement.Window.MdiMinButton
Provides VisualStyleElement objects for each state of the
Minimize button of a multiple-document interface (MDI) child
window. This class cannot be inherited.

VisualStyleElement.Window.MdiRestoreButton
Provides VisualStyleElement objects for each state of the
Restore button of a multiple-document interface (MDI) child
window. This class cannot be inherited.

VisualStyleElement.Window.MdiSysButton
Provides VisualStyleElement objects for each state of the
System button of a multiple-document interface (MDI) child
window with visual styles. This class cannot be inherited.

VisualStyleElement.Window.MinButton
Provides VisualStyleElement objects for each state of the
Minimize button of a window. This class cannot be inherited.

VisualStyleElement.Window.MinCaption
Provides VisualStyleElement objects for each state of the title
bar of a minimized window. This class cannot be inherited.

VisualStyleElement.Window.RestoreButton
Provides VisualStyleElement objects for each state of the
Restore button of a window. This class cannot be inherited.

VisualStyleElement.Window.SmallCaption
Provides VisualStyleElement objects for each state of the title
bar of a small window. This class cannot be inherited.

VisualStyleElement.Window.SmallCaptionSizingTemplate
Provides a VisualStyleElement that represents the sizing
template of the title bar of a small window. This class cannot
be inherited.

VisualStyleElement.Window.SmallCloseButton
Provides VisualStyleElement objects for each state of the
Close button of a small window. This class cannot be inherited.

VisualStyleElement.Window.SmallFrameBottom
Provides VisualStyleElement objects for each state of the
bottom border of a small window. This class cannot be
inherited.

VisualStyleElement.Window.SmallFrameBottomSizingTemplate
Provides a VisualStyleElement that represents the sizing
template of the bottom border of a small window. This class
cannot be inherited.

VisualStyleElement.Window.SmallFrameLeft
Provides VisualStyleElement objects for each state of the left
border of a small window. This class cannot be inherited.
VisualStyleElement.Window.SmallFrameLeftSizingTemplate
Provides a VisualStyleElement that represents the sizing
template of the left border of a small window. This class cannot
be inherited.

VisualStyleElement.Window.SmallFrameRight
Provides VisualStyleElement objects for each state of the right
border of a small window. This class cannot be inherited.

VisualStyleElement.Window.SmallFrameRightSizingTemplate
Provides a VisualStyleElement for the sizing template of the
right border of a small window. This class cannot be inherited.

VisualStyleElement.Window.SmallMaxCaption
Provides VisualStyleElement objects for each state of the title
bar of a maximized small window. This class cannot be
inherited.

VisualStyleElement.Window.SmallMinCaption
Provides VisualStyleElement objects for each state of the title
bar of a minimized small window. This class cannot be
inherited.

VisualStyleElement.Window.SysButton
Provides VisualStyleElement objects for each state of the
System button of a window. This class cannot be inherited.

VisualStyleElement.Window.VerticalScroll
Provides VisualStyleElement objects for each state of the
vertical scroll bar of a window. This class cannot be inherited.

VisualStyleElement.Window.VerticalThumb
Provides VisualStyleElement objects for each state of the
vertical scroll box (also known as the thumb) of a window. This
class cannot be inherited.

VisualStyleInformation
Provides information about the current visual style of the
operating system.

VisualStyleRenderer
Provides methods for drawing and getting information about
a VisualStyleElement. This class cannot be inherited.

Structs
TextMetrics
Provides basic information about the font specified by a visual
style for a particular element.

Enums
BackgroundType
Specifies the source of a visual style element's background.

BooleanProperty
Identifies the Boolean properties of a visual style element.

BorderType
Specifies the border type of a visual style element with a filled-
border background.

CheckBoxState
Specifies the visual state of a check box that is drawn with
visual styles.

ColorProperty
Identifies the color properties of a visual style element.

ComboBoxState
Specifies the visual state of a combo box that is drawn with
visual styles.

ContentAlignment
Specifies how text is aligned in a window caption.

EdgeEffects
Specifies the visual effects that can be applied to the edges of
a visual style element.

Edges
Specifies which edges of a visual style element to draw.

EdgeStyle
Specifies the styles that can be applied to the edges of a visual
style element.

EnumProperty
Identifies the enumerated type properties of a visual style
element.

FilenameProperty
Identifies the names of the image files that are used to draw a
visual style element.

FillType
Specifies the interior of visual style elements with a filled
border background.

FontProperty
Identifies the font properties of a visual style element.
GlyphFontSizingType
Specifies when the visual style selects a different glyph font
size.

GlyphType
Specifies the type of glyph for elements with a bitmap
background.

GroupBoxState
Specifies the visual state of a group box that is drawn with
visual styles.

HitTestCode
Describes the location of a point in the background specified
by a visual style.

HitTestOptions
Specifies the options that can be used when performing a hit
test on the background specified by a visual style.

HorizontalAlign
Specifies the horizontal alignment for visual style elements
with a fixed size.

IconEffect
Specifies the visual effect that the visual style will apply to an
icon.

ImageOrientation
Specifies how multiple images are arranged in a single image
file.

ImageSelectType
Specifies when the visual style selects a different multiple-
image file to draw an element.

IntegerProperty
Identifies the integer properties of a visual style element.

MarginProperty
Identifies the margin properties of a visual style element.

OffsetType
Specifies where an offset is applied to a window element.

PointProperty
Identifies the point properties of a visual style element.

PushButtonState
Specifies the visual state of a button that is drawn with visual
styles.
RadioButtonState
Specifies the visual state of an option button (also known as a
radio button) that is drawn with visual styles.

ScrollBarArrowButtonState
Specifies the visual state of a scroll arrow that is drawn with
visual styles.

ScrollBarSizeBoxState
Specifies the visual state of a scroll bar sizing handle that is
drawn with visual styles.

ScrollBarState
Specifies the visual state of a scroll bar that is drawn with
visual styles.

SizingType
Specifies how elements with a bitmap background will adjust
to fill a bounds.

StringProperty
Identifies the string properties of a visual style element.

TabItemState
Specifies the visual state of a tab item that is drawn with visual
styles.

TextBoxState
Specifies the visual state of a text box that is drawn with visual
styles.

TextMetricsCharacterSet
Specifies the character set of the font specified by a visual style
for a particular element.

TextMetricsPitchAndFamilyValues
Specifies information about the pitch, technology, and family
of the font specified by a visual style for a particular element.

TextShadowType
Specifies the type of shadow to add to text.

ThemeSizeType
Specifies the size of the visual style part to retrieve.

ToolBarState
Specifies the visual state of a toolbar item that is drawn with
visual styles.

TrackBarThumbState
Specifies the visual state of a track bar slider (also known as a
thumb) that is drawn with visual styles.
TrueSizeScalingType
Specifies the scaling type of a visual style element with a fixed
size.

VerticalAlignment
Specifies the vertical alignment for visual style elements with a
fixed size.

VisualStyleState
Specifies how visual styles are applied to the current
application.
BackgroundType BackgroundType Enum
Specifies the source of a visual style element's background.

D eclaration
public enum BackgroundType
type BackgroundType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The background of a visual style element can be a bitmap image, a filled rectangle, or nothing. The BackgroundType
values represent the return values of the GetEnumValue method when it is called with an argument value of
EnumProperty.BackgroundType.

Fields
BorderFill The background of the element is a rectangle filled with a color or pattern.
BorderFill

ImageFile The background of the element is a bitmap. If this value is set, then the property corresponding to the
ImageFile ImageFile value will contain the name of a valid image file.

None None The element has no background.


BooleanProperty BooleanProperty Enum
Identifies the Boolean properties of a visual style element.

D eclaration
public enum BooleanProperty
type BooleanProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The BooleanProperty enumeration represents a set of Boolean properties that describe visual style elements. The
BooleanProperty values are used as an argument in the GetBoolean method to specify which property value to retrieve
for the element that the VisualStyleRenderer currently represents.

Fields
AlwaysShowSizingBar AlwaysShowSizingBar The sizing handle will always be displayed.

AutoSize AutoSize The width of nonclient captions varies with the extent of the text.

BackgroundFill BackgroundFill The background of a fixed-size element is a filled rectangle.

BorderOnly BorderOnly Only the border of an image is drawn.

Composited Composited The control will handle composite drawing.

GlyphOnly GlyphOnly Only the glyph should be drawn, not the background.

GlyphTransparent GlyphTransparent The glyph has transparent areas.

IntegralSizing IntegralSizing The scaling factor must be an integer for fixed-size elements.

MirrorImage MirrorImage The image is mirrored in right-to-left display modes.


SourceGrow SourceGrow The source image will scale larger when needed.

SourceShrink SourceShrink The source image will scale smaller when needed.

Transparent Transparent The image has transparent areas.

UniformSizing UniformSizing The height and width must be sized equally.


BorderType BorderType Enum
Specifies the border type of a visual style element with a filled-border background.

D eclaration
public enum BorderType
type BorderType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The BorderType values represent the return values of the GetEnumValue method when it is called with an argument
value of EnumProperty.BorderType.

Fields
Ellipse Ellipse An elliptical border.

Rectangle Rectangle A rectangular border.

RoundedRectangle RoundedRectangle A rectangular border with rounded corners.


CheckBoxState CheckBoxState Enum
Specifies the visual state of a check box that is drawn with visual styles.

D eclaration
public enum CheckBoxState
type CheckBoxState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The CheckBoxState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.Button.CheckBox class. The CheckBoxState values are also used as an argument in the
CheckBoxRenderer.DrawCheckBox method.

Fields
CheckedDisabled CheckedDisabled The check box is checked and disabled.

CheckedHot CheckedHot The check box is checked and hot.

CheckedNormal CheckedNormal The check box is checked.

CheckedPressed CheckedPressed The check box is checked and pressed.

MixedDisabled MixedDisabled The check box is three-state and disabled.

MixedHot MixedHot The check box is three-state and hot.

MixedNormal MixedNormal The check box is three-state.

MixedPressed MixedPressed The check box is three-state and pressed.

UncheckedDisabled UncheckedDisabled The check box is unchecked and disabled.


UncheckedHot UncheckedHot The check box is unchecked and hot.

UncheckedNormal UncheckedNormal The check box is unchecked.

UncheckedPressed UncheckedPressed The check box is unchecked and pressed.


ColorProperty ColorProperty Enum
Identifies the color properties of a visual style element.

D eclaration
public enum ColorProperty
type ColorProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ColorProperty enumeration represents a set of color properties that describe visual style elements. The
ColorProperty values are used as an argument in the VisualStyleRenderer.GetColor method to specify which property
value to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
AccentColorHint AccentColorHint A recommended companion color for the accent color of the visual
style.

BorderColor BorderColor The border color of an element with a filled-border background.

BorderColorHint BorderColorHint A recommended companion color for the border color of the visual
style.

EdgeDarkShadowColor EdgeDarkShadowColor The dark shadow color for edges.

EdgeFillColor EdgeFillColor The fill color for edges.

EdgeHighlightColor EdgeHighlightColor The highlight color for edges.

EdgeLightColor EdgeLightColor The light color for edges.

EdgeShadowColor EdgeShadowColor The shadow color for edges.

FillColor FillColor The fill color of an element with a filled-border background.


FillColorHint FillColorHint A recommended companion color for the fill color of the visual style.

GlowColor GlowColor The glow color.

GlyphTextColor GlyphTextColor The color that a font-based glyph is drawn with.

GlyphTransparentColor The color of pixels in a glyph that are treated as transparent.


GlyphTransparentColor

GradientColor1 GradientColor1 The first color in a gradient.

GradientColor2 GradientColor2 The second color in a gradient.

GradientColor3 GradientColor3 The third color in a gradient.

GradientColor4 GradientColor4 The fourth color in a gradient.

GradientColor5 GradientColor5 The fifth color in a gradient.

ShadowColor ShadowColor The color of the shadow.

TextBorderColor TextBorderColor The color of the text border.

TextColor TextColor The text color.

TextShadowColor TextShadowColor The color of the text shadow.

TransparentColor TransparentColor The color of pixels that are treated as transparent.


ComboBoxState ComboBoxState Enum
Specifies the visual state of a combo box that is drawn with visual styles.

D eclaration
public enum ComboBoxState
type ComboBoxState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ComboBoxState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.ComboBox.DropDownButton class. The ComboBoxState values are also used as an argument in
the ComboBoxRenderer.DrawDropDownButton and ComboBoxRenderer.DrawTextBox methods.

Fields
Disabled Disabled The combo box is disabled.

Hot Hot The combo box is hot.

Normal Normal The combo box has the default appearance.

Pressed Pressed The combo box is pressed.


ContentAlignment ContentAlignment Enum
Specifies how text is aligned in a window caption.

D eclaration
public enum ContentAlignment
type ContentAlignment =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ContentAlignment values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is
called with an argument value of EnumProperty.ContentAlignment.

Fields
Center Center The text is centered.

Left Left The text is aligned to the left side.

Right Right The text is aligned to the right side.


EdgeEffects EdgeEffects Enum
Specifies the visual effects that can be applied to the edges of a visual style element.

D eclaration
[System.Flags]
public enum EdgeEffects
type EdgeEffects =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The EdgeEffects values are used as argument values in the VisualStyleRenderer.DrawEdge method.

Fields
FillInterior FillInterior The area within the element borders is filled.

Flat Flat The border is flat.

Mono Mono The border is one-dimensional.

None None The border is drawn without any effects.

Soft Soft The border is soft.


Edges Edges Enum
Specifies which edges of a visual style element to draw.

D eclaration
[System.Flags]
public enum Edges
type Edges =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The Edges values are used as argument values in the VisualStyleRenderer.DrawEdge method.

Fields
Bottom Bottom The bottom edge of the element.

Diagonal Diagonal A diagonal border.

Left Left The left edge of the element.

Right Right The right edge of the element.

Top Top The top edge of the element.


EdgeStyle EdgeStyle Enum
Specifies the styles that can be applied to the edges of a visual style element.

D eclaration
public enum EdgeStyle
type EdgeStyle =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The EdgeStyle values are used as argument values in the VisualStyleRenderer.DrawEdge method.

Fields
Bump Bump The edges are drawn to appear raised on the outside and sunken on the inside.

Etched Etched The edges are drawn to appear sunken on the outside and raised on the inside.

Raised Raised The edges are drawn to make the element seem raised.

Sunken Sunken The edges are drawn to make the element seem sunken.
EnumProperty EnumProperty Enum
Identifies the enumerated type properties of a visual style element.

D eclaration
public enum EnumProperty
type EnumProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The EnumProperty enumeration represents a set of enumerated properties that describe visual style elements. The
EnumProperty values are used as an argument in the VisualStyleRenderer.GetEnumValue method to specify which
property value to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
BackgroundType One of the BackgroundType values that specifies how the element's background is drawn.
BackgroundType

BorderType BorderType One of the BorderType values that specifies the border type for elements with a filled-
border background.

ContentAlignment One of the ContentAlignment values that specifies how text is aligned in a window
ContentAlignment caption.

FillType FillType One of the FillType values that specifies the fill type for elements with a filled-border
background.

GlyphFontSizingType One of the GlyphFontSizingType values that specifies when the visual style selects a
GlyphFontSizingType different glyph font size.

GlyphType GlyphType One of the GlyphType values that specifies the type of glyph for elements with a bitmap
background.

HorizontalAlignment One of the HorizontalAlign values that specifies the horizontal alignment for elements
HorizontalAlignment with a fixed size.
IconEffect IconEffect One of the IconEffect values that specifies the effect that the visual style will apply to an
icon.

ImageLayout ImageLayout One of the ImageOrientation values that specifies how multiple images are arranged in a
single image file.

ImageSelectType One of the ImageSelectType values that specifies when the visual style selects a different
ImageSelectType multiple-image file to draw an element.

OffsetType OffsetType One of the OffsetType values that specifies where an offset is applied to a window
element.

SizingType SizingType One of the SizingType values that specifies how elements with a bitmap background will
adjust to fill the bounds.

TextShadowType One of the TextShadowType values that specifies the type of shadow to add to text.
TextShadowType

TrueSizeScalingType One of the TrueSizeScalingType values that specifies when the visual style rescales an
TrueSizeScalingType element with a fixed size.

VerticalAlignment One of the VerticalAlignment values that specifies the vertical alignment for elements
VerticalAlignment with a fixed size.
FilenameProperty FilenameProperty Enum
Identifies the names of the image files that are used to draw a visual style element.

D eclaration
public enum FilenameProperty
type FilenameProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The FilenameProperty enumeration represents the names of image files that are used to draw visual style elements.
The FilenameProperty values are used as an argument in the VisualStyleRenderer.GetFilename method to specify
which file name property to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
GlyphImageFile GlyphImageFile The name of the glyph image file.

ImageFile ImageFile The name of the background image file.

ImageFile1 ImageFile1 The name of the first multiple-image file.

ImageFile2 ImageFile2 The name of the second multiple-image file.

ImageFile3 ImageFile3 The name of the third multiple-image file.

ImageFile4 ImageFile4 The name of the fourth multiple-image file.

ImageFile5 ImageFile5 The name of the fifth multiple-image file.

StockImageFile StockImageFile The name of the stock image file.


FillType FillType Enum
Specifies the interior of visual style elements with a filled border background.

D eclaration
public enum FillType
type FillType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The FillType values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is called
with an argument value of EnumProperty.FillType.

Fields
HorizontalGradient HorizontalGradient The interior of the element is a horizontal gradient.

RadialGradient RadialGradient The interior of the element is a radial gradient.

Solid Solid The interior of the element is solid.

TileImage TileImage The interior of the element is a tiled image.

VerticalGradient VerticalGradient The interior of the element is a vertical gradient.


FontProperty FontProperty Enum
Identifies the font properties of a visual style element.

D eclaration
public enum FontProperty
type FontProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The FontProperty enumeration represents a set of font properties that describe visual style elements. The
FontProperty values are used as an argument in the VisualStyleRenderer.GetFont method to specify which property
value to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
GlyphFont GlyphFont The font that a glyph is drawn with.
GlyphFontSizingType GlyphFontSizingType Enum
Specifies when the visual style selects a different glyph font size.

D eclaration
public enum GlyphFontSizingType
type GlyphFontSizingType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The GlyphFontSizingType values represent the return values of the VisualStyleRenderer.GetEnumValue method when
it is called with an argument value of EnumProperty.GlyphFontSizingType.

Fields
Dpi Dpi Glyph font size changes are based on dots per inch (DPI) settings.

None None Glyph font sizes do not change.

Size Size Glyph font size changes are based on font size settings.
GlyphType GlyphType Enum
Specifies the type of glyph for elements with a bitmap background.

D eclaration
public enum GlyphType
type GlyphType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The GlyphType values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is called
with an argument value of EnumProperty.GlyphType.

Fields
FontGlyph FontGlyph The glyph is a font.

ImageGlyph ImageGlyph The glyph is a bitmap.

None None The element does not include a glyph.


GroupBoxState GroupBoxState Enum
Specifies the visual state of a group box that is drawn with visual styles.

D eclaration
public enum GroupBoxState
type GroupBoxState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The GroupBoxState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.Button.GroupBox class. The GroupBoxState values are also used as an argument in the
GroupBoxRenderer.DrawGroupBox method.

Fields
Disabled Disabled The group box is disabled.

Normal Normal The group box has the default appearance.


HitTestCode HitTestCode Enum
Describes the location of a point in the background specified by a visual style.

D eclaration
public enum HitTestCode
type HitTestCode =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The HitTestCode values represent the return values of the VisualStyleRenderer.HitTestBackground method.

Fields
Bottom Bottom The hit test succeeded in the bottom border segment.

BottomLeft BottomLeft The hit test succeeded in the bottom and left border intersection.

BottomRight BottomRight The hit test succeeded in the bottom and right border intersection.

Client Client The hit test succeeded in the middle background segment.

Left Left The hit test succeeded in the left border segment.

Nowhere Nowhere The hit test succeeded outside the control or on a transparent area.

Right Right The hit test succeeded in the right border segment.

Top Top The hit test succeeded in the top border segment.

TopLeft TopLeft The hit test succeeded in the top and left border intersection.

TopRight TopRight The hit test succeeded in the top and right border intersection.
HitTestOptions HitTestOptions Enum
Specifies the options that can be used when performing a hit test on the background specified by a visual style.

D eclaration
[System.Flags]
public enum HitTestOptions
type HitTestOptions =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The HitTestOptions values are used as an argument in the VisualStyleRenderer.HitTestBackground method.

Fields
BackgroundSegment The hit test option for the background segment.
BackgroundSegment

Caption Caption The hit test option for the caption.

FixedBorder The hit test option for the fixed border.


FixedBorder

ResizingBorder The hit test option for the resizing border.


ResizingBorder

ResizingBorderBottom The hit test option for the bottom resizing border.
ResizingBorderBottom

ResizingBorderLeft The hit test option for the left resizing border.
ResizingBorderLeft

ResizingBorderRight The hit test option for the right resizing border.
ResizingBorderRight

ResizingBorderTop The hit test option for the top resizing border.
ResizingBorderTop

SizingTemplate The resizing border is specified as a template, not just window edges. This option is mutually
SizingTemplate exclusive with SystemSizingMargins; SizingTemplate takes precedence.
SystemSizingMargins The system resizing border width is used instead of visual style content margins. This option is
SystemSizingMargins mutually exclusive with SizingTemplate; SizingTemplate takes precedence.
HorizontalAlign HorizontalAlign Enum
Specifies the horizontal alignment for visual style elements with a fixed size.

D eclaration
public enum HorizontalAlign
type HorizontalAlign =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The HorizontalAlign values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is
called with an argument value of EnumProperty.HorizontalAlignment.

Fields
Center Center The element is centered horizontally.

Left Left The element is aligned to the left side.

Right Right The element is aligned to the right side.


IconEffect IconEffect Enum
Specifies the visual effect that the visual style will apply to an icon.

D eclaration
public enum IconEffect
type IconEffect =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The IconEffect values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is called
with an argument value of EnumProperty.IconEffect.

Fields
Alpha Alpha The icon is alpha-blended.

Glow Glow The icon glows.

None None No visual effect is applied to the icon.

Pulse Pulse The icon pulses.

Shadow Shadow The icon has a shadow.


ImageOrientation ImageOrientation Enum
Specifies how multiple images are arranged in a single image file.

D eclaration
public enum ImageOrientation
type ImageOrientation =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ImageOrientation values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is
called with an argument value of EnumProperty.ImageLayout.

Fields
Horizontal Horizontal Images are arranged horizontally in the multiple-image file.

Vertical Vertical Images are arranged vertically in the multiple-image file.


ImageSelectType ImageSelectType Enum
Specifies when the visual style selects a different multiple-image file to draw an element.

D eclaration
public enum ImageSelectType
type ImageSelectType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
A visual style can define up to five multiple-image files for an element. These image files are specified by the
FilenameProperty values ImageFile1 through ImageFile5. The ImageSelectType values indicate when the visual style
selects a different image file to draw the element.
The ImageSelectType values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is
called with an argument value of EnumProperty.ImageSelectType.

Fields
Dpi Dpi Image file changes are based on dots per inch (DPI) settings.

None None The image file does not change.

Size Size Image file changes are based on size settings.


IntegerProperty IntegerProperty Enum
Identifies the integer properties of a visual style element.

D eclaration
public enum IntegerProperty
type IntegerProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The IntegerProperty enumeration represents a set of integer properties that describe visual style elements. The
IntegerProperty values are used as an argument in the VisualStyleRenderer.GetInteger method to specify which
property value to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
AlphaLevel AlphaLevel The alpha value for an icon, between 0 and 255.

AlphaThreshold The minimum alpha value of a solid pixel, between 0 and 255.
AlphaThreshold

BorderSize BorderSize The size of the border line for elements with a filled-border background.

GlyphIndex GlyphIndex The index into the font for font-based glyphs.

GradientRatio1 The amount of GradientColor1 to use in a color gradient. The sum of the five
GradientRatio1 GradientRatio properties must equal 255.

GradientRatio2 The amount of GradientColor2 to use in a color gradient. The sum of the five
GradientRatio2 GradientRatio properties must equal 255.

GradientRatio3 The amount of GradientColor3 to use in a color gradient. The sum of the five
GradientRatio3 GradientRatio properties must equal 255.

GradientRatio4 The amount of GradientColor4 to use in a color gradient. The sum of the five
GradientRatio4 GradientRatio properties must equal 255.
GradientRatio5 The amount of GradientColor5 to use in a color gradient. The sum of the five
GradientRatio5 GradientRatio properties must equal 255.

Height Height The height of an element.

ImageCount ImageCount The number of state images in multiple-image file.

MinDpi1 MinDpi1 The minimum dots per inch (DPI) that ImageFile1 was designed for.

MinDpi2 MinDpi2 The minimum DPI that ImageFile2 was designed for.

MinDpi3 MinDpi3 The minimum DPI that ImageFile3 was designed for.

MinDpi4 MinDpi4 The minimum DPI that ImageFile4 was designed for.

MinDpi5 MinDpi5 The minimum DPI that ImageFile5 was designed for.

ProgressChunkSize The size of progress bar elements.


ProgressChunkSize

ProgressSpaceSize The size of spaces between progress bar elements.


ProgressSpaceSize

RoundCornerHeight A percentage value that represents the height of a rounded corner, from 0 to 100.
RoundCornerHeight

RoundCornerWidth A percentage value that represents the width of a rounded corner, from 0 to 100.
RoundCornerWidth

Saturation Saturation The amount of saturation for an image, between 0 and 255.

TextBorderSize The size of the border around text characters.


TextBorderSize

TrueSizeStretchMark A percentage value indicating how far a fixed-size element will stretch when the target
TrueSizeStretchMark exceeds the source.

Width Width The width of an element.


MarginProperty MarginProperty Enum
Identifies the margin properties of a visual style element.

D eclaration
public enum MarginProperty
type MarginProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The MarginProperty enumeration represents a set of margin properties that describe the placement of visual style
elements. The MarginProperty values are used as an argument in the VisualStyleRenderer.GetMargins method to
specify which property value to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
CaptionMargins CaptionMargins Specifies where caption text can be placed.

ContentMargins ContentMargins Specifies where content can be placed.

SizingMargins SizingMargins Specifies a margin used for nine-grid sizing.


OffsetType OffsetType Enum
Specifies where an offset is applied to a window element.

D eclaration
public enum OffsetType
type OffsetType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The OffsetType values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is called
with an argument value of EnumProperty.OffsetType.

Fields
AboveLastButton AboveLastButton The offset is applied from above the last button.

BelowLastButton BelowLastButton The offset is applied from below the last button.

BottomLeft BottomLeft The offset is applied from the bottom left of the element.

BottomMiddle BottomMiddle The offset is applied from the bottom middle of the element.

BottomRight BottomRight The offset is applied from the bottom right of the element.

LeftOfCaption LeftOfCaption The offset is applied from the left of the caption.

LeftOfLastButton LeftOfLastButton The offset is applied from the left of the last button.

MiddleLeft MiddleLeft The offset is applied from the middle left of the element.

MiddleRight MiddleRight The offset is applied from the middle right of the element.

RightOfCaption RightOfCaption The offset is applied from the right of the caption.
RightOfLastButton RightOfLastButton The offset is applied from the right of the last button.

TopLeft TopLeft The offset is applied from the top left of the element.

TopMiddle TopMiddle The offset is applied from the top middle of the element.

TopRight TopRight The offset is applied from the top right of the element.
PointProperty PointProperty Enum
Identifies the point properties of a visual style element.

D eclaration
public enum PointProperty
type PointProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The PointProperty enumeration represents a set of point properties that describe visual style elements. The
PointProperty values are used as an argument in the VisualStyleRenderer.GetPoint method to specify which property
value to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
MinSize MinSize The smallest bounds that the image specified by the ImageFile value was designed
for.

MinSize1 MinSize1 The smallest bounds that the image specified by the ImageFile1 value was
designed for.

MinSize2 MinSize2 The smallest bounds that the image specified by the ImageFile2 value was
designed for.

MinSize3 MinSize3 The smallest bounds that the image specified by the ImageFile3 value was
designed for.

MinSize4 MinSize4 The smallest bounds that the image specified by the ImageFile4 value was
designed for.

MinSize5 MinSize5 The smallest bounds that the image specified by the ImageFile5 value was
designed for.

Offset Offset The offset for window element layouts.

TextShadowOffset The location of character shadows, relative to origin characters.


TextShadowOffset
PushButtonState PushButtonState Enum
Specifies the visual state of a button that is drawn with visual styles.

D eclaration
public enum PushButtonState
type PushButtonState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The PushButtonState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.Button.PushButton class. The PushButtonState values are also used as an argument in the
ButtonRenderer.DrawButton method.

Fields
Default Default The button has the default appearance.

Disabled Disabled The button is disabled.

Hot Hot The button is hot.

Normal Normal The button has the normal appearance.

Pressed Pressed The button is pressed.


RadioButtonState RadioButtonState Enum
Specifies the visual state of an option button (also known as a radio button) that is drawn with visual styles.

D eclaration
public enum RadioButtonState
type RadioButtonState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The RadioButtonState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.Button.RadioButton class. The RadioButtonState values are also used as an argument in the
RadioButtonRenderer.DrawRadioButton method.

Fields
CheckedDisabled CheckedDisabled The option button is checked and disabled.

CheckedHot CheckedHot The option button is checked and hot.

CheckedNormal CheckedNormal The option button is checked and normal.

CheckedPressed CheckedPressed The option button is checked and pressed.

UncheckedDisabled UncheckedDisabled The option button is unchecked and disabled.

UncheckedHot UncheckedHot The option button is unchecked and hot.

UncheckedNormal UncheckedNormal The option button is unchecked and normal.

UncheckedPressed UncheckedPressed The option button is unchecked and pressed.


ScrollBarArrowButtonState ScrollBarArrowButtonState
Enum
Specifies the visual state of a scroll arrow that is drawn with visual styles.

D eclaration
public enum ScrollBarArrowButtonState
type ScrollBarArrowButtonState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ScrollBarArrowButtonState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.ScrollBar.ArrowButton class. The ScrollBarArrowButtonState values are also used as an argument
in the ScrollBarRenderer.DrawArrowButton method.

Fields
DownDisabled DownDisabled The scroll arrow points down and is disabled.

DownHot DownHot The scroll arrow points down and is hot.

DownNormal DownNormal The scroll arrow points down and is normal.

DownPressed DownPressed The scroll arrow points down and is pressed.

LeftDisabled LeftDisabled The scroll arrow points left and is disabled.

LeftHot LeftHot The scroll arrow points left and is hot.

LeftNormal LeftNormal The scroll arrow points left and is normal.

LeftPressed LeftPressed The scroll arrow points left and is pressed.

RightDisabled RightDisabled The scroll arrow points right and is disabled.


RightHot RightHot The scroll arrow points right and is hot.

RightNormal RightNormal The scroll arrow points right and is normal.

RightPressed RightPressed The scroll arrow points right and is pressed.

UpDisabled UpDisabled The scroll arrow points up and is disabled.

UpHot UpHot The scroll arrow points up and is hot.

UpNormal UpNormal The scroll arrow points up and is normal.

UpPressed UpPressed The scroll arrow points up and is pressed.


ScrollBarSizeBoxState ScrollBarSizeBoxState Enum
Specifies the visual state of a scroll bar sizing handle that is drawn with visual styles.

D eclaration
public enum ScrollBarSizeBoxState
type ScrollBarSizeBoxState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ScrollBarSizeBoxState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.ScrollBar.SizeBox class. The ScrollBarSizeBoxState values are also used as an argument in the
ScrollBarRenderer.DrawSizeBox method.

Fields
LeftAlign LeftAlign The sizing handle is aligned to the left.

RightAlign RightAlign The sizing handle is aligned to the right.


ScrollBarState ScrollBarState Enum
Specifies the visual state of a scroll bar that is drawn with visual styles.

D eclaration
public enum ScrollBarState
type ScrollBarState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ScrollBarState values correspond to the states of the VisualStyleElement objects exposed by the following classes:
VisualStyleElement.ScrollBar.LeftTrackHorizontal
VisualStyleElement.ScrollBar.RightTrackHorizontal
VisualStyleElement.ScrollBar.LowerTrackVertical
VisualStyleElement.ScrollBar.UpperTrackVertical
VisualStyleElement.ScrollBar.ThumbButtonHorizontal
VisualStyleElement.ScrollBar.ThumbButtonVertical
The ScrollBarState values are also used as an argument in the System.Windows.Forms.ScrollBarRenderer class
methods that draw the scroll bar track, scroll box (also known as the thumb), and scroll box grip.

Fields
Disabled Disabled The scroll bar element is disabled.

Hot Hot The scroll bar element is hot.

Normal Normal The scroll bar element is normal.

Pressed Pressed The scroll bar element is pressed.


SizingType SizingType Enum
Specifies how elements with a bitmap background will adjust to fill a bounds.

D eclaration
public enum SizingType
type SizingType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The SizingType values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is called
with an argument value of EnumProperty.SizingType.

Fields
FixedSize FixedSize The element cannot be resized.

Stretch Stretch The background image stretches to fill the bounds.

Tile Tile The background image repeats the pattern to fill the bounds.
StringProperty StringProperty Enum
Identifies the string properties of a visual style element.

D eclaration
public enum StringProperty
type StringProperty =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The StringProperty enumeration represents a set of string properties that describe visual style elements. The
StringProperty values are used as an argument in the VisualStyleRenderer.GetString method to specify which property
value to retrieve for the element that the VisualStyleRenderer currently represents.

Fields
Text Text The text that will be displayed with the element.
TabItemState TabItemState Enum
Specifies the visual state of a tab item that is drawn with visual styles.

D eclaration
public enum TabItemState
type TabItemState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The TabItemState values correspond to the states of the VisualStyleElement objects exposed by the following classes:
VisualStyleElement.Tab.TabItem
VisualStyleElement.Tab.TabItemLeftEdge
VisualStyleElement.Tab.TabItemRightEdge
VisualStyleElement.Tab.TopTabItem
VisualStyleElement.Tab.TopTabItemLeftEdge
VisualStyleElement.Tab.TopTabItemRightEdge
The TabItemState values are also used as an argument in the TabRenderer.DrawTabItem method.

Fields
Disabled Disabled The tab item is disabled.

Hot Hot The tab item is hot.

Normal Normal The tab item is normal.

Selected Selected The tab item is selected.


TextBoxState TextBoxState Enum
Specifies the visual state of a text box that is drawn with visual styles.

D eclaration
public enum TextBoxState
type TextBoxState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The TextBoxState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.TextBox.TextEdit class. The TextBoxState values are also used as an argument in the
TextBoxRenderer.DrawTextBox method.

Fields
Assist Assist The text box appears in assist mode.

Disabled Disabled The text box appears disabled.

Hot Hot The text box appears hot.

Normal Normal The text box appears normal.

Readonly Readonly The text box appears read-only.

Selected Selected The text box appears selected.


TextMetrics TextMetrics Struct
Provides basic information about the font specified by a visual style for a particular element.

D eclaration
public struct TextMetrics
type TextMetrics = struct

I nheritance H ierarchy
Object Object
ValueType ValueType

Remarks
The TextMetrics structure specifies the return values of the VisualStyleRenderer.GetTextMetrics method.

Properties
Ascent
Ascent

Gets or sets the ascent of characters in the font.

AverageCharWidth
AverageCharWidth

Gets or sets the average width of characters in the font.

BreakChar
BreakChar

Gets or sets the character used to define word breaks for text justification.

CharSet
CharSet

Gets or sets the character set of the font.

DefaultChar
DefaultChar

Gets or sets the character to be substituted for characters not in the font.

Descent
Descent
Gets or sets the descent of characters in the font.

DigitizedAspectX
DigitizedAspectX

Gets or sets the horizontal aspect of the device for which the font was designed.

DigitizedAspectY
DigitizedAspectY

Gets or sets the vertical aspect of the device for which the font was designed.

ExternalLeading
ExternalLeading

Gets or sets the amount of extra leading that the application adds between rows.

FirstChar
FirstChar

Gets or sets the first character defined in the font.

Height
Height

Gets or sets the height of characters in the font.

InternalLeading
InternalLeading

Gets or sets the amount of leading inside the bounds set by the Height property.

Italic
Italic

Gets or sets a value indicating whether the font is italic.

LastChar
LastChar

Gets or sets the last character defined in the font.

MaxCharWidth
MaxCharWidth

Gets or sets the width of the widest character in the font.

Overhang
Overhang

Gets or sets the extra width per string that may be added to some synthesized fonts.

PitchAndFamily
PitchAndFamily

Gets or sets information about the pitch, technology, and family of a physical font.

StruckOut
StruckOut

Gets or sets a value indicating whether the font specifies a horizontal line through the characters.

Underlined
Underlined

Gets or sets a value indicating whether the font is underlined.

Weight
Weight

Gets or sets the weight of the font.


TextMetrics.Ascent TextMetrics.Ascent
I n this Article
Gets or sets the ascent of characters in the font.
public int Ascent { get; set; }
member this.Ascent : int with get, set

Returns
Int32 Int32
The ascent of characters in the font.

Remarks
The ascent is the distance a character extends above the base line.
TextMetrics.AverageCharWidth TextMetrics.AverageChar
Width
I n this Article
Gets or sets the average width of characters in the font.

public int AverageCharWidth { get; set; }


member this.AverageCharWidth : int with get, set

Returns
Int32 Int32
The average width of characters in the font.

Remarks
The average character width is generally defined as the width of the letter "x". This value does not include the overhang
required for bold or italic characters.
TextMetrics.BreakChar TextMetrics.BreakChar
I n this Article
Gets or sets the character used to define word breaks for text justification.
public char BreakChar { get; set; }
member this.BreakChar : char with get, set

Returns
Char Char
The character used to define word breaks for text justification.
TextMetrics.CharSet TextMetrics.CharSet
I n this Article
Gets or sets the character set of the font.
public System.Windows.Forms.VisualStyles.TextMetricsCharacterSet CharSet { get; set; }
member this.CharSet : System.Windows.Forms.VisualStyles.TextMetricsCharacterSet with get, set

Returns
TextMetricsCharacterSet TextMetricsCharacterSet
One of the TextMetricsCharacterSet values that specifies the character set of the font.
TextMetrics.DefaultChar TextMetrics.DefaultChar
I n this Article
Gets or sets the character to be substituted for characters not in the font.
public char DefaultChar { get; set; }
member this.DefaultChar : char with get, set

Returns
Char Char
The character to be substituted for characters not in the font.
TextMetrics.Descent TextMetrics.Descent
I n this Article
Gets or sets the descent of characters in the font.
public int Descent { get; set; }
member this.Descent : int with get, set

Returns
Int32 Int32
The descent of characters in the font.

Remarks
The descent is the distance a character extends below the base line.
TextMetrics.DigitizedAspectX TextMetrics.DigitizedAspect
X
I n this Article
Gets or sets the horizontal aspect of the device for which the font was designed.

public int DigitizedAspectX { get; set; }


member this.DigitizedAspectX : int with get, set

Returns
Int32 Int32
The horizontal aspect of the device for which the font was designed.
TextMetrics.DigitizedAspectY TextMetrics.DigitizedAspect
Y
I n this Article
Gets or sets the vertical aspect of the device for which the font was designed.

public int DigitizedAspectY { get; set; }


member this.DigitizedAspectY : int with get, set

Returns
Int32 Int32
The vertical aspect of the device for which the font was designed.
TextMetrics.ExternalLeading TextMetrics.ExternalLeading
I n this Article
Gets or sets the amount of extra leading that the application adds between rows.
public int ExternalLeading { get; set; }
member this.ExternalLeading : int with get, set

Returns
Int32 Int32
The amount of extra leading (space) required between rows.

Remarks
Because the leading area is outside the font, it contains no marks and is not altered by text output calls in either opaque
or transparent mode.
TextMetrics.FirstChar TextMetrics.FirstChar
I n this Article
Gets or sets the first character defined in the font.
public char FirstChar { get; set; }
member this.FirstChar : char with get, set

Returns
Char Char
The first character defined in the font.
TextMetrics.Height TextMetrics.Height
I n this Article
Gets or sets the height of characters in the font.
public int Height { get; set; }
member this.Height : int with get, set

Returns
Int32 Int32
The height of characters in the font.

Remarks
The height of a character is equal to the Ascent plus the Descent.
TextMetrics.InternalLeading TextMetrics.InternalLeading
I n this Article
Gets or sets the amount of leading inside the bounds set by the Height property.
public int InternalLeading { get; set; }
member this.InternalLeading : int with get, set

Returns
Int32 Int32
The amount of leading inside the bounds set by the Height property.

Remarks
Accent marks and other diacritical characters may occur in this area.
TextMetrics.Italic TextMetrics.Italic
I n this Article
Gets or sets a value indicating whether the font is italic.
public bool Italic { get; set; }
member this.Italic : bool with get, set

Returns
Boolean Boolean
true if the font is italic; otherwise, false .
TextMetrics.LastChar TextMetrics.LastChar
I n this Article
Gets or sets the last character defined in the font.
public char LastChar { get; set; }
member this.LastChar : char with get, set

Returns
Char Char
The last character defined in the font.
TextMetrics.MaxCharWidth TextMetrics.MaxCharWidth
I n this Article
Gets or sets the width of the widest character in the font.
public int MaxCharWidth { get; set; }
member this.MaxCharWidth : int with get, set

Returns
Int32 Int32
The width of the widest character in the font.
TextMetrics.Overhang TextMetrics.Overhang
I n this Article
Gets or sets the extra width per string that may be added to some synthesized fonts.
public int Overhang { get; set; }
member this.Overhang : int with get, set

Returns
Int32 Int32
The extra width per string that may be added to some synthesized fonts.
TextMetrics.PitchAndFamily TextMetrics.PitchAndFamily
I n this Article
Gets or sets information about the pitch, technology, and family of a physical font.
public System.Windows.Forms.VisualStyles.TextMetricsPitchAndFamilyValues PitchAndFamily { get; set;
}
member this.PitchAndFamily : System.Windows.Forms.VisualStyles.TextMetricsPitchAndFamilyValues with
get, set

Returns
TextMetricsPitchAndFamilyValues TextMetricsPitchAndFamilyValues
A bitwise combination of the TextMetricsPitchAndFamilyValues values that specifies the pitch, technology, and family of
a physical font.
TextMetrics.StruckOut TextMetrics.StruckOut
I n this Article
Gets or sets a value indicating whether the font specifies a horizontal line through the characters.
public bool StruckOut { get; set; }
member this.StruckOut : bool with get, set

Returns
Boolean Boolean
true if the font has a horizontal line through the characters; otherwise, false .
TextMetrics.Underlined TextMetrics.Underlined
I n this Article
Gets or sets a value indicating whether the font is underlined.
public bool Underlined { get; set; }
member this.Underlined : bool with get, set

Returns
Boolean Boolean
true if the font is underlined; otherwise, false .
TextMetrics.Weight TextMetrics.Weight
I n this Article
Gets or sets the weight of the font.
public int Weight { get; set; }
member this.Weight : int with get, set

Returns
Int32 Int32
The weight of the font.
TextMetricsCharacterSet TextMetricsCharacterSet Enum
Specifies the character set of the font specified by a visual style for a particular element.

D eclaration
public enum TextMetricsCharacterSet
type TextMetricsCharacterSet =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The TextMetricsCharacterSet enumeration specifies the possible values of the CharSet property of the TextMetrics
structure.

Fields
Ansi Ansi The ANSI character set.

Arabic Arabic The Arabic character set.

Baltic Baltic The Baltic character set.

ChineseBig5 ChineseBig5 The Traditional Chinese character set.

Default Default The default character set.

EastEurope EastEurope The Eastern Europe character set.

Gb2312 Gb2312 The Gb2312 simplified Chinese character set.

Greek Greek The Greek character set.

Hangul Hangul The Hangul (Korean) character set.

Hebrew Hebrew The Hebrew character set.


Johab Johab The Johab (Korean) character set.

Mac Mac The Macintosh character set.

Oem Oem The OEM character set.

Russian Russian The Russian character set.

ShiftJis ShiftJis The ShiftJis (Japanese) character set.

Symbol Symbol The Symbol character set.

Thai Thai The Thai character set.

Turkish Turkish The Turkish character set.

Vietnamese Vietnamese The Vietnamese character set.


TextMetricsPitchAndFamilyValues TextMetricsPitchAnd
FamilyValues Enum
Specifies information about the pitch, technology, and family of the font specified by a visual style for a particular
element.

D eclaration
[System.Flags]
public enum TextMetricsPitchAndFamilyValues
type TextMetricsPitchAndFamilyValues =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The TextMetricsPitchAndFamilyValues enumeration specifies the possible values of the PitchAndFamily property of the
TextMetrics structure.

Fields
Device Device The font is a device font.

FixedPitch FixedPitch If this value is set, the font is a variable pitch font. Otherwise, the font is a fixed-pitch font.

TrueType TrueType The font is a TrueType font.

Vector Vector The font is a vector font.


TextShadowType TextShadowType Enum
Specifies the type of shadow to add to text.

D eclaration
public enum TextShadowType
type TextShadowType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The TextShadowType values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is
called with an argument value of EnumProperty.TextShadowType.

Fields
Continuous Continuous A continuous shadow is drawn.

None None No shadow is drawn.

Single Single A single shadow is drawn.


ThemeSizeType ThemeSizeType Enum
Specifies the size of the visual style part to retrieve.

D eclaration
public enum ThemeSizeType
type ThemeSizeType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ThemeSizeType values are used as an argument for the VisualStyleRenderer.GetPartSize method.

Fields
Draw Draw The size that the current visual style uses to draw the part.

Minimum Minimum The minimum size of the visual style part.

True True The size of the visual style part that will best fit the available space.
ToolBarState ToolBarState Enum
Specifies the visual state of a toolbar item that is drawn with visual styles.

D eclaration
public enum ToolBarState
type ToolBarState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The ToolBarState values correspond to the states of the VisualStyleElement objects exposed by the
VisualStyleElement.ToolBar.Button, VisualStyleElement.ToolBar.DropDownButton,
VisualStyleElement.ToolBar.SplitButton, and VisualStyleElement.ToolBar.SplitButtonDropDown classes.

Fields
Checked Checked The item is in the checked state.

Disabled Disabled The item is in the disabled state.

Hot Hot The item is in the hot state.

HotChecked HotChecked The item is in the hot and checked states.

Normal Normal The item is in the normal state.

Pressed Pressed The item is in the pressed state.


TrackBarThumbState TrackBarThumbState Enum
Specifies the visual state of a track bar slider (also known as a thumb) that is drawn with visual styles.

D eclaration
public enum TrackBarThumbState
type TrackBarThumbState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The TrackBarThumbState values correspond to the states of the VisualStyleElement objects exposed by the following
classes:
VisualStyleElement.TrackBar.Thumb
VisualStyleElement.TrackBar.ThumbBottom
VisualStyleElement.TrackBar.ThumbLeft
VisualStyleElement.TrackBar.ThumbRight
VisualStyleElement.TrackBar.ThumbTop
VisualStyleElement.TrackBar.ThumbVertical
The TrackBarThumbState values are also used as an argument in the System.Windows.Forms.TrackBarRenderer class
methods that draw the track bar slider.

Fields
Disabled Disabled The slider appears disabled.

Hot Hot The slider appears hot.

Normal Normal The slider appears normal.

Pressed Pressed The slider appears pressed.


TrueSizeScalingType TrueSizeScalingType Enum
Specifies the scaling type of a visual style element with a fixed size.

D eclaration
public enum TrueSizeScalingType
type TrueSizeScalingType =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The TrueSizeScalingType values represent the return values of the VisualStyleRenderer.GetEnumValue method when it
is called with an argument value of EnumProperty.TrueSizeScalingType.

Fields
Dpi Dpi The element is scaled to dots per inch (DPI) settings.

None None No scaling type is specified for the element.

Size Size The element is scaled to size settings.


VerticalAlignment VerticalAlignment Enum
Specifies the vertical alignment for visual style elements with a fixed size.

D eclaration
public enum VerticalAlignment
type VerticalAlignment =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
The VerticalAlignment values represent the return values of the VisualStyleRenderer.GetEnumValue method when it is
called with an argument value of EnumProperty.VerticalAlignment.

Fields
Bottom Bottom The element is aligned to the bottom.

Center Center The element is centered vertically.

Top Top The element is aligned to the top.


VisualStyleElement VisualStyleElement Class
Identifies a control or user interface (UI) element that is drawn with visual styles.

D eclaration
public class VisualStyleElement
type VisualStyleElement = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement class identifies a Windows control or user interface (UI) element that is defined by the current
visual style of the operating system. A visual style element is defined in terms of class, part, and state:
The class identifies a group of related visual style elements that are typically drawn together. The class is specified by
the ClassName property.
The part defines a discrete member of a class. The part is specified by the Part property.
The state describes the current visual state of the element defined by the class and part. The state is specified by the
State property.
The System.Windows.Forms.VisualStyles namespace exposes hundreds of VisualStyleElement objects that represent
the controls and user interface elements that can be defined by a visual style. These objects are exposed as static
properties of nested classes of VisualStyleElement. For each property, the qualified name of the owning class
represents the class and the part of the drawn element, and the property name represents the state of the element. For
example, the VisualStyleElement.Button.PushButton.Pressed property returns a VisualStyleElement that can be used to
draw a button in the pressed state with visual styles. The Pressed property name corresponds to the state,
PushButton corresponds to the part, and Button identifies the class of the visual style element.

To draw a visual style element, create a VisualStyleRenderer, set it to the VisualStyleElement you wish to draw, and
then call the DrawBackground method. To determine whether the current visual style provides a definition for a
particular element, call the IsElementDefined method with the element as the argument.
VisualStyleElement and VisualStyleRenderer wrap the functionality of the visual styles API from the Windows Shell
portion of the Windows Platform SDK. For more information on visual styles, see "Using Windows XP Visual Styles" in
the Platform SDK portion of the MSDN Library at http://msdn.microsoft.com/library.

Properties
ClassName
ClassName

Gets the class name of the visual style element that this VisualStyleElement represents.

Part
Part

Gets a value indicating the part of the visual style element that this VisualStyleElement represents.
State
State

Gets a value indicating the state of the visual style element that this VisualStyleElement represents.

Methods
CreateElement(String, Int32, Int32)
CreateElement(String, Int32, Int32)

Creates a new visual style element from the specified class, part, and state values.
VisualStyleElement.ClassName VisualStyleElement.Class
Name
I n this Article
Gets the class name of the visual style element that this VisualStyleElement represents.

public string ClassName { get; }


member this.ClassName : string

Returns
String String
A string that represents the class name of a visual style element.

Remarks
A class name refers to a group of related visual style elements that are typically drawn together. A class name can
correspond to a control, such as "SCROLLBAR" and "TRACKBAR", but a class name can also refer to a group of
elements that do not correspond to a particular control, such as "EXPLORERBAR" and "STARTPANEL".
For more information on visual style classes, parts, and states, see "Parts and States" in the Windows Shell
documentation at http://msdn.microsoft.com/library.
See PartPart
Also StateState
VisualStyleElement.CreateElement VisualStyleElement.
CreateElement
I n this Article
Creates a new visual style element from the specified class, part, and state values.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CreateElement (string className,


int part, int state);
static member CreateElement : string * int * int ->
System.Windows.Forms.VisualStyles.VisualStyleElement

Parameters
className String String
A string that represents the class name of the visual style element to be created.
part Int32 Int32
A value that represents the part of the visual style element to be created.
state Int32 Int32
A value that represents the state of the visual style element to be created.
Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement with the ClassName, Part, and State properties initialized to the className , part , and state
parameters.
VisualStyleElement.Part VisualStyleElement.Part
I n this Article
Gets a value indicating the part of the visual style element that this VisualStyleElement represents.
public int Part { get; }
member this.Part : int

Returns
Int32 Int32
A value that represents the part of a visual style element.

Remarks
A part is a discrete member of a class of visual style elements. For example, visual style elements that represent a check
box, radio button, and push button are all considered parts of the "BUTTON" class.
Part values are integers that range from 1 to the number of parts defined for a particular class. For more information
on visual style classes, parts, and states, see "Parts and States" in the Windows Shell documentation at
http://msdn.microsoft.com/library.
See ClassNameClassName
Also StateState
VisualStyleElement.State VisualStyleElement.State
I n this Article
Gets a value indicating the state of the visual style element that this VisualStyleElement represents.
public int State { get; }
member this.State : int

Returns
Int32 Int32
A value that represents the state of a visual style element.

Remarks
A visual style part can have one or more visual states. For example, a visual style element that represents a radio
button can be in the disabled, checked, or unchecked state.
State values are integers that range from 1 to the number of states defined for a particular part. For more information
on visual style classes, parts, and states, see "Parts and States" in the Windows Shell documentation located at
http://msdn.microsoft.com/library.
See ClassNameClassName
Also PartPart
VisualStyleElement.Button VisualStyleElement.Button
Class
Contains classes that provide VisualStyleElement objects for button-related controls. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Button
type VisualStyleElement.Button = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Button class provides a foundation in which the following classes are defined:
VisualStyleElement.Button.CheckBox
VisualStyleElement.Button.GroupBox
VisualStyleElement.Button.PushButton
VisualStyleElement.Button.RadioButton
VisualStyleElement.Button.UserButton
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the control
specified by the class name.
VisualStyleElement.Button.CheckBox VisualStyleElement.
Button.CheckBox Class
Provides VisualStyleElement objects for the different states of the check box control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Button.CheckBox
type VisualStyleElement.Button.CheckBox = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Button.CheckBox class returns a VisualStyleElement for a different state of the
check box control.

Properties
CheckedDisabled
CheckedDisabled

Gets a visual style element that represents a disabled check box in the checked state.

CheckedHot
CheckedHot

Gets a visual style element that represents a hot check box in the checked state.

CheckedNormal
CheckedNormal

Gets a visual style element that represents a normal check box in the checked state.

CheckedPressed
CheckedPressed

Gets a visual style element that represents a pressed check box in the checked state.

MixedDisabled
MixedDisabled

Gets a visual style element that represents a disabled check box in the indeterminate state.

MixedHot
MixedHot

Gets a visual style element that represents a hot check box in the indeterminate state.

MixedNormal
MixedNormal

Gets a visual style element that represents a normal check box in the indeterminate state.

MixedPressed
MixedPressed

Gets a visual style element that represents a pressed check box in the indeterminate state.

UncheckedDisabled
UncheckedDisabled

Gets a visual style element that represents a disabled check box in the unchecked state.

UncheckedHot
UncheckedHot

Gets a visual style element that represents a hot check box in the unchecked state.

UncheckedNormal
UncheckedNormal

Gets a visual style element that represents a normal check box in the unchecked state.

UncheckedPressed
UncheckedPressed

Gets a visual style element that represents a pressed check box in the unchecked state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Button.CheckBox.CheckedDisabled
VisualStyleElement.Button.CheckBox.CheckedDisabled
I n this Article
Gets a visual style element that represents a disabled check box in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedDisabled { get; }


member this.CheckedDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled check box in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElement_Button_CheckBox8 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox8(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.CheckedDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.CheckedDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.CheckedDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedDisabled property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.CheckedHot Visual
StyleElement.Button.CheckBox.CheckedHot
I n this Article
Gets a visual style element that represents a hot check box in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedHot { get; }


member this.CheckedHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot check box in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElement_Button_CheckBox6 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.CheckedHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.CheckedHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.CheckedHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedHot property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.CheckedNormal
VisualStyleElement.Button.CheckBox.CheckedNormal
I n this Article
Gets a visual style element that represents a normal check box in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedNormal { get; }


member this.CheckedNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal check box in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_CheckBox5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.CheckedNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.CheckedNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.CheckedNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedNormal property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.CheckedPressed
VisualStyleElement.Button.CheckBox.CheckedPressed
I n this Article
Gets a visual style element that represents a pressed check box in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedPressed { get; }


member this.CheckedPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed check box in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_CheckBox7 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox7(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.CheckedPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.CheckedPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.CheckedPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedPressed property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.MixedDisabled
VisualStyleElement.Button.CheckBox.MixedDisabled
I n this Article
Gets a visual style element that represents a disabled check box in the indeterminate state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement MixedDisabled { get; }


member this.MixedDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled check box in the indeterminate state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the MixedDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_CheckBox12 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox12(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.MixedDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.MixedDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.MixedDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the MixedDisabled property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.MixedHot Visual
StyleElement.Button.CheckBox.MixedHot
I n this Article
Gets a visual style element that represents a hot check box in the indeterminate state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement MixedHot { get; }


member this.MixedHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot check box in the indeterminate state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the MixedHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElement_Button_CheckBox10 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox10(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.MixedHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.MixedHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.MixedHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the MixedHot property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.MixedNormal Visual
StyleElement.Button.CheckBox.MixedNormal
I n this Article
Gets a visual style element that represents a normal check box in the indeterminate state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement MixedNormal { get; }


member this.MixedNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal check box in the indeterminate state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the MixedNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_CheckBox9 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox9(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.MixedNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.MixedNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.MixedNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the MixedNormal property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.MixedPressed Visual
StyleElement.Button.CheckBox.MixedPressed
I n this Article
Gets a visual style element that represents a pressed check box in the indeterminate state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement MixedPressed { get; }


member this.MixedPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed check box in the indeterminate state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the MixedPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_CheckBox11 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox11(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.MixedPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.MixedPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.MixedPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the MixedPressed property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.UncheckedDisabled
VisualStyleElement.Button.CheckBox.UncheckedDisabled
I n this Article
Gets a visual style element that represents a disabled check box in the unchecked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedDisabled { get; }


member this.UncheckedDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled check box in the unchecked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UncheckedDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElement_Button_CheckBox4 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.UncheckedDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.UncheckedDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.UncheckedDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the UncheckedDisabled property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.UncheckedHot
VisualStyleElement.Button.CheckBox.UncheckedHot
I n this Article
Gets a visual style element that represents a hot check box in the unchecked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedHot { get; }


member this.UncheckedHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot check box in the unchecked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UncheckedHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_CheckBox2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.UncheckedHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.UncheckedHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.UncheckedHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the UncheckedHot property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.UncheckedNormal
VisualStyleElement.Button.CheckBox.UncheckedNormal
I n this Article
Gets a visual style element that represents a normal check box in the unchecked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedNormal { get; }


member this.UncheckedNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal check box in the unchecked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UncheckedNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElement_Button_CheckBox1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.UncheckedNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.UncheckedNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.UncheckedNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the UncheckedNormal property to create a VisualStyleRenderer.
VisualStyleElement.Button.CheckBox.UncheckedPressed
VisualStyleElement.Button.CheckBox.UncheckedPressed
I n this Article
Gets a visual style element that represents a pressed check box in the unchecked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedPressed { get; }


member this.UncheckedPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed check box in the unchecked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UncheckedPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElement_Button_CheckBox3 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElement_Button_CheckBox3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.UncheckedPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.UncheckedPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.UncheckedPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the UncheckedPressed property to create a VisualStyleRenderer.
VisualStyleElement.Button.GroupBox VisualStyleElement.
Button.GroupBox Class
Provides VisualStyleElement objects for the different states of the group box control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Button.GroupBox
type VisualStyleElement.Button.GroupBox = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Button.GroupBox class returns a VisualStyleElement for a different state of
the group box control.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled group box.

Normal
Normal

Gets a visual style element that represents a normal group box.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Button.GroupBox.Disabled VisualStyle
Element.Button.GroupBox.Disabled
I n this Article
Gets a visual style element that represents a disabled group box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled group box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_GroupBox2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_GroupBox2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.GroupBox.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.GroupBox.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.GroupBox.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Button.GroupBox.Normal VisualStyle
Element.Button.GroupBox.Normal
I n this Article
Gets a visual style element that represents a normal group box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal group box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_GroupBox1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_GroupBox1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.GroupBox.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.GroupBox.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.GroupBox.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Button.PushButton VisualStyle
Element.Button.PushButton Class
Provides VisualStyleElement objects for the different states of the button control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Button.PushButton
type VisualStyleElement.Button.PushButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Button.PushButton class returns a VisualStyleElement for a different state of
the button control.

Properties
Default
Default

Gets a visual style element that represents a default button.

Disabled
Disabled

Gets a visual style element that represents a disabled button.

Hot
Hot

Gets a visual style element that represents a hot button.

Normal
Normal

Gets a visual style element that represents a normal button.

Pressed
Pressed

Gets a visual style element that represents a pressed button.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Button.PushButton.Default Visual
StyleElement.Button.PushButton.Default
I n this Article
Gets a visual style element that represents a default button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Default { get; }


member this.Default : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a default button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Default property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_PushButton5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.PushButton.Default))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Default);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.PushButton.Default",
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));
}

Remarks
You can use the VisualStyleElement returned by the Default property to create a VisualStyleRenderer.
VisualStyleElement.Button.PushButton.Disabled Visual
StyleElement.Button.PushButton.Disabled
I n this Article
Gets a visual style element that represents a disabled button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_PushButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.PushButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.PushButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Button.PushButton.Hot VisualStyle
Element.Button.PushButton.Hot
I n this Article
Gets a visual style element that represents a hot button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_PushButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.PushButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.PushButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Button.PushButton.Normal Visual
StyleElement.Button.PushButton.Normal
I n this Article
Gets a visual style element that represents a normal button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_PushButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.PushButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.PushButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Button.PushButton.Pressed Visual
StyleElement.Button.PushButton.Pressed
I n this Article
Gets a visual style element that represents a pressed button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed button.
VisualStyleElement.Button.RadioButton VisualStyle
Element.Button.RadioButton Class
Provides VisualStyleElement objects for the different states of the radio button control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Button.RadioButton
type VisualStyleElement.Button.RadioButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Button.RadioButton class returns a VisualStyleElement for a different state of
the radio button control.

Properties
CheckedDisabled
CheckedDisabled

Gets a visual style element that represents a disabled radio button in the checked state.

CheckedHot
CheckedHot

Gets a visual style element that represents a hot radio button in the checked state.

CheckedNormal
CheckedNormal

Gets a visual style element that represents a normal radio button in the checked state.

CheckedPressed
CheckedPressed

Gets a visual style element that represents a pressed radio button in the checked state.

UncheckedDisabled
UncheckedDisabled

Gets a visual style element that represents a disabled radio button in the unchecked state.

UncheckedHot
UncheckedHot

Gets a visual style element that represents a hot radio button in the unchecked state.

UncheckedNormal
UncheckedNormal

Gets a visual style element that represents a normal radio button in the unchecked state.

UncheckedPressed
UncheckedPressed

Gets a visual style element that represents a pressed radio button in the unchecked state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Button.RadioButton.CheckedDisabled
VisualStyleElement.Button.RadioButton.CheckedDisabled
I n this Article
Gets a visual style element that represents a disabled radio button in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedDisabled { get; }


member this.CheckedDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled radio button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElement_Button_RadioButton8 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElement_Button_RadioButton8(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.RadioButton.CheckedDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.CheckedDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.CheckedDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedDisabled property to create a VisualStyleRenderer.
VisualStyleElement.Button.RadioButton.CheckedHot
VisualStyleElement.Button.RadioButton.CheckedHot
I n this Article
Gets a visual style element that represents a hot radio button in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedHot { get; }


member this.CheckedHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot radio button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElement_Button_RadioButton6 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_RadioButton6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.RadioButton.CheckedHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.CheckedHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.CheckedHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedHot property to create a VisualStyleRenderer.
VisualStyleElement.Button.RadioButton.CheckedNormal
VisualStyleElement.Button.RadioButton.CheckedNormal
I n this Article
Gets a visual style element that represents a normal radio button in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedNormal { get; }


member this.CheckedNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal radio button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_RadioButton5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_RadioButton5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.RadioButton.CheckedNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.CheckedNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.CheckedNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedNormal property to create a VisualStyleRenderer.
VisualStyleElement.Button.RadioButton.CheckedPressed
VisualStyleElement.Button.RadioButton.CheckedPressed
I n this Article
Gets a visual style element that represents a pressed radio button in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement CheckedPressed { get; }


member this.CheckedPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed radio button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the CheckedPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_RadioButton7 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_RadioButton7(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.RadioButton.CheckedPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.CheckedPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.CheckedPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the CheckedPressed property to create a VisualStyleRenderer.
VisualStyleElement.Button.RadioButton.Unchecked
Disabled VisualStyleElement.Button.RadioButton.
UncheckedDisabled
I n this Article
Gets a visual style element that represents a disabled radio button in the unchecked state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedDisabled { get; }
member this.UncheckedDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled radio button in the unchecked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UncheckedDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElement_Button_RadioButton4 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElement_Button_RadioButton4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.RadioButton.UncheckedDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.UncheckedDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.UncheckedDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the UncheckedDisabled property to create a VisualStyleRenderer.
VisualStyleElement.Button.RadioButton.UncheckedHot
VisualStyleElement.Button.RadioButton.UncheckedHot
I n this Article
Gets a visual style element that represents a hot radio button in the unchecked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedHot { get; }


member this.UncheckedHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot radio button in the unchecked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UncheckedHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElement_Button_RadioButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_RadioButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.RadioButton.UncheckedHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.UncheckedHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.UncheckedHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the UncheckedHot property to create a VisualStyleRenderer.
VisualStyleElement.Button.RadioButton.Unchecked
Normal VisualStyleElement.Button.RadioButton.
UncheckedNormal
I n this Article
Gets a visual style element that represents a normal radio button in the unchecked state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedNormal { get; }
member this.UncheckedNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal radio button in the unchecked state.

Remarks
You can use the VisualStyleElement returned by the UncheckedNormal property to create a VisualStyleRenderer.
VisualStyleElement.Button.RadioButton.Unchecked
Pressed VisualStyleElement.Button.RadioButton.
UncheckedPressed
I n this Article
Gets a visual style element that represents a pressed radio button in the unchecked state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement UncheckedPressed { get; }
member this.UncheckedPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed radio button in the unchecked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UncheckedPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElement_Button_RadioButton3 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElement_Button_RadioButton3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.RadioButton.UncheckedPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.UncheckedPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.UncheckedPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the UncheckedPressed property to create a VisualStyleRenderer.
VisualStyleElement.Button.UserButton VisualStyle
Element.Button.UserButton Class
Provides a VisualStyleElement for a user button. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Button.UserButton
type VisualStyleElement.Button.UserButton = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Button.UserButton class gets a VisualStyleElement that represents a
user button.

Properties
Normal
Normal

Gets a visual style element that represents a user button.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Button.UserButton.Normal Visual
StyleElement.Button.UserButton.Normal
I n this Article
Gets a visual style element that represents a user button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a user button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_UserButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.UserButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.UserButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.UserButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ComboBox VisualStyleElement.
ComboBox Class
Contains a class that provides VisualStyleElement objects for the drop-down arrow of the combo box control. This
class cannot be inherited.

D eclaration
public static class VisualStyleElement.ComboBox
type VisualStyleElement.ComboBox = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.ComboBox class provides a foundation in which the
VisualStyleElement.ComboBox.DropDownButton class is defined. VisualStyleElement.ComboBox.DropDownButton
provides a set of properties that return a VisualStyleElement for each state of the drop-down arrow of a combo box
control. To get a VisualStyleElement for the text box portion of a combo box, use one of the
VisualStyleElement.TextBox.TextEdit properties.
VisualStyleElement.ComboBox.DropDownButton Visual
StyleElement.ComboBox.DropDownButton Class
Provides VisualStyleElement objects for the different states of the drop-down arrow of the combo box control. This
class cannot be inherited.

D eclaration
public static class VisualStyleElement.ComboBox.DropDownButton
type VisualStyleElement.ComboBox.DropDownButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ComboBox.DropDownButton class returns a VisualStyleElement for a
different state of the drop-down arrow of the combo box control.

Properties
Disabled
Disabled

Gets a visual style element that represents a drop-down arrow in the disabled state.

Hot
Hot

Gets a visual style element that represents a drop-down arrow in the hot state.

Normal
Normal

Gets a visual style element that represents a drop-down arrow in the normal state.

Pressed
Pressed

Gets a visual style element that represents a drop-down arrow in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ComboBox.DropDownButton.
Disabled VisualStyleElement.ComboBox.DropDown
Button.Disabled
I n this Article
Gets a visual style element that represents a drop-down arrow in the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_DropDownButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_ComboBox_DropDownButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ComboBox.DropDownButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ComboBox.DropDownButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ComboBox.DropDownButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ComboBox.DropDownButton.Hot
VisualStyleElement.ComboBox.DropDownButton.Hot
I n this Article
Gets a visual style element that represents a drop-down arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_DropDownButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_ComboBox_DropDownButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ComboBox.DropDownButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ComboBox.DropDownButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ComboBox.DropDownButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ComboBox.DropDownButton.Normal
VisualStyleElement.ComboBox.DropDownButton.Normal
I n this Article
Gets a visual style element that represents a drop-down arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_DropDownButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_ComboBox_DropDownButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ComboBox.DropDownButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ComboBox.DropDownButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ComboBox.DropDownButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ComboBox.DropDownButton.Pressed
VisualStyleElement.ComboBox.DropDownButton.Pressed
I n this Article
Gets a visual style element that represents a drop-down arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_DropDownButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_ComboBox_DropDownButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ComboBox.DropDownButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ComboBox.DropDownButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ComboBox.DropDownButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar VisualStyleElement.
ExplorerBar Class
Contains classes that provide VisualStyleElement objects for each part of the Explorer Bar. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar
type VisualStyleElement.ExplorerBar = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.ExplorerBar class provides a foundation in which the following classes are defined:
VisualStyleElement.ExplorerBar.HeaderBackground
VisualStyleElement.ExplorerBar.HeaderClose
VisualStyleElement.ExplorerBar.HeaderPin
VisualStyleElement.ExplorerBar.IEBarMenu
VisualStyleElement.ExplorerBar.NormalGroupBackground
VisualStyleElement.ExplorerBar.NormalGroupCollapse
VisualStyleElement.ExplorerBar.NormalGroupExpand
VisualStyleElement.ExplorerBar.NormalGroupHead
VisualStyleElement.ExplorerBar.SpecialGroupBackground
VisualStyleElement.ExplorerBar.SpecialGroupCollapse
VisualStyleElement.ExplorerBar.SpecialGroupExpand
VisualStyleElement.ExplorerBar.SpecialGroupHead
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the Explorer
Bar part specified by the class name.
VisualStyleElement.ExplorerBar.HeaderBackground Visual
StyleElement.ExplorerBar.HeaderBackground Class
Provides a VisualStyleElement for the background of the Explorer Bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.HeaderBackground
type VisualStyleElement.ExplorerBar.HeaderBackground = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ExplorerBar.HeaderBackground class gets a VisualStyleElement that
represents the background of the Explorer Bar.

Properties
Normal
Normal

Gets a visual style element that represents the background of the Explorer Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.HeaderBackground.
Normal VisualStyleElement.ExplorerBar.Header
Background.Normal
I n this Article
Gets a visual style element that represents the background of the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the Explorer Bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarHeaderBackground1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderBackground1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderBackground.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderBackground.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderBackground.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderClose VisualStyle
Element.ExplorerBar.HeaderClose Class
Provides VisualStyleElement objects for each state of the Close button of the Explorer Bar. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.HeaderClose
type VisualStyleElement.ExplorerBar.HeaderClose = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ExplorerBar.HeaderClose class returns a VisualStyleElement for a different
state of the Close button of the Explorer Bar.

Properties
Hot
Hot

Gets a visual style element that represents a Close button in the hot state.

Normal
Normal

Gets a visual style element that represents a Close button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a Close button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.HeaderClose.Hot Visual
StyleElement.ExplorerBar.HeaderClose.Hot
I n this Article
Gets a visual style element that represents a Close button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Close button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarHeaderClose2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderClose2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderClose.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderClose.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderClose.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderClose.Normal
VisualStyleElement.ExplorerBar.HeaderClose.Normal
I n this Article
Gets a visual style element that represents a Close button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Close button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarHeaderClose1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderClose1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderClose.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderClose.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderClose.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderClose.Pressed
VisualStyleElement.ExplorerBar.HeaderClose.Pressed
I n this Article
Gets a visual style element that represents a Close button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Close button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarHeaderClose3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderClose3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderClose.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderClose.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderClose.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderPin VisualStyle
Element.ExplorerBar.HeaderPin Class
Provides VisualStyleElement objects for each state of the Auto Hide button (which is displayed as a push pin) of the
Explorer Bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.HeaderPin
type VisualStyleElement.ExplorerBar.HeaderPin = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ExplorerBar.HeaderPin class returns a VisualStyleElement for a different state
of the Auto Hide button of the Explorer Bar.

Properties
Hot
Hot

Gets a visual style element that represents an Auto Hide button (which is displayed as a push pin) in the hot state.

Normal
Normal

Gets a visual style element that represents an Auto Hide button (which is displayed as a push pin) in the normal
state.

Pressed
Pressed

Gets a visual style element that represents an Auto Hide button (which is displayed as a push pin) in the pressed
state.

SelectedHot
SelectedHot

Gets a visual style element that represents a selected Auto Hide button (which is displayed as a push pin) in the
hot state.

SelectedNormal
SelectedNormal

Gets a visual style element that represents a selected Auto Hide button (which is displayed as a push pin) in the
normal state.

SelectedPressed
SelectedPressed

Gets a visual style element that represents a selected Auto Hide button (which is displayed as a push pin) in the
pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.HeaderPin.Hot Visual
StyleElement.ExplorerBar.HeaderPin.Hot
I n this Article
Gets a visual style element that represents an Auto Hide button (which is displayed as a push pin) in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an Auto Hide button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarHeaderPin2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderPin2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderPin.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderPin.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderPin.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderPin.Normal Visual
StyleElement.ExplorerBar.HeaderPin.Normal
I n this Article
Gets a visual style element that represents an Auto Hide button (which is displayed as a push pin) in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an Auto Hide button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarHeaderPin1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderPin1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderPin.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderPin.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderPin.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderPin.Pressed Visual
StyleElement.ExplorerBar.HeaderPin.Pressed
I n this Article
Gets a visual style element that represents an Auto Hide button (which is displayed as a push pin) in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an Auto Hide button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarHeaderPin3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderPin3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderPin.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderPin.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderPin.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderPin.SelectedHot
VisualStyleElement.ExplorerBar.HeaderPin.SelectedHot
I n this Article
Gets a visual style element that represents a selected Auto Hide button (which is displayed as a push pin) in the hot
state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement SelectedHot { get; }
member this.SelectedHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a selected Auto Hide button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the SelectedHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementExplorerBarHeaderPin5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderPin5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderPin.SelectedHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderPin.SelectedHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderPin.SelectedHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the SelectedHot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderPin.Selected
Normal VisualStyleElement.ExplorerBar.HeaderPin.
SelectedNormal
I n this Article
Gets a visual style element that represents a selected Auto Hide button (which is displayed as a push pin) in the
normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement SelectedNormal { get; }


member this.SelectedNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a selected Auto Hide button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the SelectedNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementExplorerBarHeaderPin4 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderPin4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderPin.SelectedNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderPin.SelectedNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderPin.SelectedNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the SelectedNormal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.HeaderPin.Selected
Pressed VisualStyleElement.ExplorerBar.HeaderPin.
SelectedPressed
I n this Article
Gets a visual style element that represents a selected Auto Hide button (which is displayed as a push pin) in the
pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement SelectedPressed { get; }


member this.SelectedPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a selected Auto Hide button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the SelectedPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementExplorerBarHeaderPin6 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementExplorerBarHeaderPin6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.HeaderPin.SelectedPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.HeaderPin.SelectedPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.HeaderPin.SelectedPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the SelectedPressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.IEBarMenu VisualStyle
Element.ExplorerBar.IEBarMenu Class
Provides VisualStyleElement objects for each state of the expanded-menu arrow of the Explorer Bar. This class cannot
be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.IEBarMenu
type VisualStyleElement.ExplorerBar.IEBarMenu = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ExplorerBar.IEBarMenu class gets a VisualStyleElement for a different state of
the menu button of the Explorer Bar.

Properties
Hot
Hot

Gets a visual style element that represents a hot menu button.

Normal
Normal

Gets a visual style element that represents a normal menu button.

Pressed
Pressed

Gets a visual style element that represents a pressed menu button.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.IEBarMenu.Hot Visual
StyleElement.ExplorerBar.IEBarMenu.Hot
I n this Article
Gets a visual style element that represents a hot menu button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot menu button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarIEBarMenu2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarIEBarMenu2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.IEBarMenu.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.IEBarMenu.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.IEBarMenu.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.IEBarMenu.Normal Visual
StyleElement.ExplorerBar.IEBarMenu.Normal
I n this Article
Gets a visual style element that represents a normal menu button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal menu button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarIEBarMenu1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarIEBarMenu1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.IEBarMenu.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.IEBarMenu.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.IEBarMenu.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.IEBarMenu.Pressed Visual
StyleElement.ExplorerBar.IEBarMenu.Pressed
I n this Article
Gets a visual style element that represents a pressed menu button.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed menu button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarIEBarMenu3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarIEBarMenu3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.IEBarMenu.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.IEBarMenu.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.IEBarMenu.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupBackground
VisualStyleElement.ExplorerBar.NormalGroupBackground
Class
Provides a VisualStyleElement for the background of a common group of items in the Explorer Bar. This class cannot
be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.NormalGroupBackground
type VisualStyleElement.ExplorerBar.NormalGroupBackground = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ExplorerBar.NormalGroupBackground class gets a VisualStyleElement
that represents the background of a common group of items in the Explorer Bar, such as the File and Folder Tasks
group in Windows Explorer.

Properties
Normal
Normal

Gets a visual style element that represents the background of a common group of items in the Explorer Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.NormalGroup
Background.Normal VisualStyleElement.ExplorerBar.
NormalGroupBackground.Normal
I n this Article
Gets a visual style element that represents the background of a common group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of a common group of items in the Explorer Bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarNormalGroupBackground1 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarNormalGroupBackground1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupBackground.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupBackground.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupBackground.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupCollapse
VisualStyleElement.ExplorerBar.NormalGroupCollapse
Class
Provides VisualStyleElement objects for each state of the collapse button of a common group of items in the Explorer
Bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.NormalGroupCollapse
type VisualStyleElement.ExplorerBar.NormalGroupCollapse = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ExplorerBar.NormalGroupCollapse class gets a VisualStyleElement for a
different state of the collapse button of a common group of items in the Explorer Bar, such as the File and Folder
Tasks group in Windows Explorer.

Properties
Hot
Hot

Gets a visual style element that represents a hot collapse button of a common group of items in the Explorer Bar.

Normal
Normal

Gets a visual style element that represents a normal collapse button of a common group of items in the Explorer
Bar.

Pressed
Pressed

Gets a visual style element that represents a pressed collapse button of a common group of items in the Explorer
Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.NormalGroupCollapse.
Hot VisualStyleElement.ExplorerBar.NormalGroup
Collapse.Hot
I n this Article
Gets a visual style element that represents a hot collapse button of a common group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot collapse button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
Handle the form's Paint event and call the DrawVisualStyleElementExplorerBarNormalGroupCollapse2 method from
the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarNormalGroupCollapse2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupCollapse.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupCollapse.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupCollapse.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupCollapse.
Normal VisualStyleElement.ExplorerBar.NormalGroup
Collapse.Normal
I n this Article
Gets a visual style element that represents a normal collapse button of a common group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal collapse button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
Handle the form's Paint event and call the DrawVisualStyleElementExplorerBarNormalGroupCollapse1 method from
the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarNormalGroupCollapse1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupCollapse.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupCollapse.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupCollapse.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupCollapse.
Pressed VisualStyleElement.ExplorerBar.NormalGroup
Collapse.Pressed
I n this Article
Gets a visual style element that represents a pressed collapse button of a common group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed collapse button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarNormalGroupCollapse3 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarNormalGroupCollapse3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupCollapse.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupCollapse.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupCollapse.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupExpand
VisualStyleElement.ExplorerBar.NormalGroupExpand
Class
Provides VisualStyleElement objects for each state of the expand button of a common group of items in the Explorer
Bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.NormalGroupExpand
type VisualStyleElement.ExplorerBar.NormalGroupExpand = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ExplorerBar.NormalGroupExpand class gets a VisualStyleElement for a
different state of the expand button of a common group of items in the Explorer Bar, such as the File and Folder
Tasks group in Windows Explorer.

Properties
Hot
Hot

Gets a visual style element that represents a hot expand button of a common group of items in the Explorer Bar.

Normal
Normal

Gets a visual style element that represents a normal expand button of a common group of items in the Explorer
Bar.

Pressed
Pressed

Gets a visual style element that represents a pressed expand button of a common group of items in the Explorer
Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.NormalGroupExpand.Hot
VisualStyleElement.ExplorerBar.NormalGroupExpand.Hot
I n this Article
Gets a visual style element that represents a hot expand button of a common group of items in the Explorer Bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot expand button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarNormalGroupExpand2 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementExplorerBarNormalGroupExpand2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupExpand.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupExpand.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupExpand.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupExpand.
Normal VisualStyleElement.ExplorerBar.NormalGroup
Expand.Normal
I n this Article
Gets a visual style element that represents a normal expand button of a common group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal expand button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarNormalGroupExpand1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementExplorerBarNormalGroupExpand1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupExpand.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupExpand.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupExpand.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupExpand.
Pressed VisualStyleElement.ExplorerBar.NormalGroup
Expand.Pressed
I n this Article
Gets a visual style element that represents a pressed expand button of a common group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed expand button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarNormalGroupExpand3 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementExplorerBarNormalGroupExpand3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupExpand.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupExpand.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupExpand.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.NormalGroupHead Visual
StyleElement.ExplorerBar.NormalGroupHead Class
Provides a VisualStyleElement for the title bar of a common group of items in the Explorer Bar. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.NormalGroupHead
type VisualStyleElement.ExplorerBar.NormalGroupHead = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ExplorerBar.NormalGroupHead class gets a VisualStyleElement that
represents the title bar of a common group of items in the Explorer Bar, such as the File and Folder Tasks group in
Windows Explorer.

Properties
Normal
Normal

Gets a visual style element that represents the title bar of a common group of items in the Explorer Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.NormalGroupHead.
Normal VisualStyleElement.ExplorerBar.NormalGroup
Head.Normal
I n this Article
Gets a visual style element that represents the title bar of a common group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a common group of items in the Explorer Bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarNormalGroupHead1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementExplorerBarNormalGroupHead1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.NormalGroupHead.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.NormalGroupHead.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.NormalGroupHead.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupBackground
VisualStyleElement.ExplorerBar.SpecialGroupBackground
Class
Provides a VisualStyleElement for the background of a special group of items in the Explorer Bar. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.SpecialGroupBackground
type VisualStyleElement.ExplorerBar.SpecialGroupBackground = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ExplorerBar.SpecialGroupBackground class gets a VisualStyleElement
that represents the background of a special group of items in the Explorer Bar, such as the Music Tasks group in
Windows Explorer.

Properties
Normal
Normal

Gets a visual style element that represents the background of a special group of items in the Explorer Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.SpecialGroupBackground.
Normal VisualStyleElement.ExplorerBar.SpecialGroup
Background.Normal
I n this Article
Gets a visual style element that represents the background of a special group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of a special group of items in the Explorer Bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupBackground1 method from the Paint event-handling method,
passing e as 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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupCollapse
VisualStyleElement.ExplorerBar.SpecialGroupCollapse
Class
Provides VisualStyleElement objects for each state of the collapse button of a special group of items in the Explorer
Bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.SpecialGroupCollapse
type VisualStyleElement.ExplorerBar.SpecialGroupCollapse = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ExplorerBar.SpecialGroupCollapse class gets a VisualStyleElement for a
different state of the collapse button of a special group of items in the Explorer Bar, such as the Music Tasks group in
Windows Explorer.

Properties
Hot
Hot

Gets a visual style element that represents a hot collapse button of a special group of items in the Explorer Bar.

Normal
Normal

Gets a visual style element that represents a normal collapse button of a special group of items in the Explorer Bar.

Pressed
Pressed

Gets a visual style element that represents a pressed collapse button of a special group of items in the Explorer
Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.SpecialGroupCollapse.
Hot VisualStyleElement.ExplorerBar.SpecialGroup
Collapse.Hot
I n this Article
Gets a visual style element that represents a hot collapse button of a special group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot collapse button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupCollapse2 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarSpecialGroupCollapse2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupCollapse.
Normal VisualStyleElement.ExplorerBar.SpecialGroup
Collapse.Normal
I n this Article
Gets a visual style element that represents a normal collapse button of a special group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal collapse button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupCollapse1 method from the Paint event-handling method,
passing e as 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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupCollapse.
Pressed VisualStyleElement.ExplorerBar.SpecialGroup
Collapse.Pressed
I n this Article
Gets a visual style element that represents a pressed collapse button of a special group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed collapse button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupCollapse3 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarSpecialGroupCollapse3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupCollapse.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupExpand
VisualStyleElement.ExplorerBar.SpecialGroupExpand
Class
Provides VisualStyleElement objects for each state of the expand button of a special group of items in the Explorer Bar.
This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.SpecialGroupExpand
type VisualStyleElement.ExplorerBar.SpecialGroupExpand = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ExplorerBar.SpecialGroupExpand class gets a VisualStyleElement for a
different state of the expand button of a special group of items in the Explorer Bar, such as the Music Tasks group in
Windows Explorer.

Properties
Hot
Hot

Gets a visual style element that represents a hot expand button of a special group of items in the Explorer Bar.

Normal
Normal

Gets a visual style element that represents a normal expand button of a special group of items in the Explorer Bar.

Pressed
Pressed

Gets a visual style element that represents a pressed expand button of a special group of items in the Explorer Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.SpecialGroupExpand.Hot
VisualStyleElement.ExplorerBar.SpecialGroupExpand.Hot
I n this Article
Gets a visual style element that represents a hot expand button of a special group of items in the Explorer Bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot expand button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupExpand2 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarSpecialGroupExpand2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.SpecialGroupExpand.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupExpand.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupExpand.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupExpand.
Normal VisualStyleElement.ExplorerBar.SpecialGroup
Expand.Normal
I n this Article
Gets a visual style element that represents a normal expand button of a special group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal expand button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupExpand1 method from the Paint event-handling method, passing
e as 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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupExpand.
Pressed VisualStyleElement.ExplorerBar.SpecialGroup
Expand.Pressed
I n this Article
Gets a visual style element that represents a pressed expand button of a special group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed expand button.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupExpand3 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementExplorerBarSpecialGroupExpand3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.SpecialGroupExpand.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupExpand.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupExpand.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ExplorerBar.SpecialGroupHead Visual
StyleElement.ExplorerBar.SpecialGroupHead Class
Provides a VisualStyleElement for the title bar of a special group of items in the Explorer Bar. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ExplorerBar.SpecialGroupHead
type VisualStyleElement.ExplorerBar.SpecialGroupHead = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ExplorerBar.SpecialGroupHead class gets a VisualStyleElement that
represents the title bar of a special group of items in the Explorer Bar, such as the Music Tasks group in Windows
Explorer.

Properties
Normal
Normal

Gets a visual style element that represents the title bar of a special group of items in the Explorer Bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ExplorerBar.SpecialGroupHead.
Normal VisualStyleElement.ExplorerBar.SpecialGroup
Head.Normal
I n this Article
Gets a visual style element that represents the title bar of a special group of items in the Explorer Bar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a special group of items in the Explorer Bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementExplorerBarSpecialGroupHead1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementExplorerBarSpecialGroupHead1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ExplorerBar.SpecialGroupHead.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupHead.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupHead.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Header VisualStyleElement.Header
Class
Contains classes that provide VisualStyleElement objects for each part of the header control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Header
type VisualStyleElement.Header = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Header class provides a foundation in which the following classes are defined:
VisualStyleElement.Header.Item
VisualStyleElement.Header.ItemLeft
VisualStyleElement.Header.ItemRight
VisualStyleElement.Header.SortArrow
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the header
control part specified by the class name.
VisualStyleElement.Header.Item VisualStyleElement.
Header.Item Class
Provides VisualStyleElement objects for each state of an item of the header control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Header.Item
type VisualStyleElement.Header.Item = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Header.Item class gets a VisualStyleElement for a different state of a header
item.

Properties
Hot
Hot

Gets a visual style element that represents a hot header item.

Normal
Normal

Gets a visual style element that represents a normal header item.

Pressed
Pressed

Gets a visual style element that represents a pressed header item.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Header.Item.Hot VisualStyleElement.
Header.Item.Hot
I n this Article
Gets a visual style element that represents a hot header item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot header item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItem2 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementHeaderItem2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.Item.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.Item.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.Item.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Header.Item.Normal VisualStyle
Element.Header.Item.Normal
I n this Article
Gets a visual style element that represents a normal header item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal header item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItem1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementHeaderItem1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.Item.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.Item.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.Item.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Header.Item.Pressed VisualStyle
Element.Header.Item.Pressed
I n this Article
Gets a visual style element that represents a pressed header item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed header item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItem3 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementHeaderItem3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.Item.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.Item.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.Item.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Header.ItemLeft VisualStyleElement.
Header.ItemLeft Class
Provides VisualStyleElement objects for each state of the leftmost item of the header control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Header.ItemLeft
type VisualStyleElement.Header.ItemLeft = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Header.ItemLeft class gets a VisualStyleElement for a different state of the
leftmost header item.

Properties
Hot
Hot

Gets a visual style element that represents the leftmost header item in the hot state.

Normal
Normal

Gets a visual style element that represents the leftmost header item in the normal state.

Pressed
Pressed

Gets a visual style element that represents the leftmost header item in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Header.ItemLeft.Hot VisualStyle
Element.Header.ItemLeft.Hot
I n this Article
Gets a visual style element that represents the leftmost header item in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the leftmost header item in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItemLeft2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderItemLeft2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.ItemLeft.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.ItemLeft.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.ItemLeft.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Header.ItemLeft.Normal VisualStyle
Element.Header.ItemLeft.Normal
I n this Article
Gets a visual style element that represents the leftmost header item in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the leftmost header item in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItemLeft1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderItemLeft1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.ItemLeft.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.ItemLeft.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.ItemLeft.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Header.ItemLeft.Pressed VisualStyle
Element.Header.ItemLeft.Pressed
I n this Article
Gets a visual style element that represents the leftmost header item in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the leftmost header item in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItemLeft3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderItemLeft3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.ItemLeft.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.ItemLeft.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.ItemLeft.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Header.ItemRight VisualStyleElement.
Header.ItemRight Class
Provides VisualStyleElement objects for each state of the rightmost item of the header control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Header.ItemRight
type VisualStyleElement.Header.ItemRight = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Header.ItemRight class gets a VisualStyleElement for a different state of the
rightmost header item.

Properties
Hot
Hot

Gets a visual style element that represents the rightmost header item in the hot state.

Normal
Normal

Gets a visual style element that represents the rightmost header item in the normal state.

Pressed
Pressed

Gets a visual style element that represents the rightmost header item in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Header.ItemRight.Hot VisualStyle
Element.Header.ItemRight.Hot
I n this Article
Gets a visual style element that represents the rightmost header item in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the rightmost header item in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItemRight2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderItemRight2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.ItemRight.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.ItemRight.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.ItemRight.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Header.ItemRight.Normal VisualStyle
Element.Header.ItemRight.Normal
I n this Article
Gets a visual style element that represents the rightmost header item in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the rightmost header item in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItemRight1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderItemRight1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.ItemRight.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.ItemRight.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.ItemRight.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Header.ItemRight.Pressed VisualStyle
Element.Header.ItemRight.Pressed
I n this Article
Gets a visual style element that represents the rightmost header item in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the rightmost header item in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementHeaderItemRight3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderItemRight3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.ItemRight.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.ItemRight.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.ItemRight.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Header.SortArrow VisualStyle
Element.Header.SortArrow Class
Provides VisualStyleElement objects for the sort arrow of a header item. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Header.SortArrow
type VisualStyleElement.Header.SortArrow = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Header.SortArrow class gets a VisualStyleElement for the sort arrow of a
header item.

Properties
SortedDown
SortedDown

Gets a visual style element that represents a downward-pointing sort arrow.

SortedUp
SortedUp

Gets a visual style element that represents an upward-pointing sort arrow.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Header.SortArrow.SortedDown Visual
StyleElement.Header.SortArrow.SortedDown
I n this Article
Gets a visual style element that represents a downward-pointing sort arrow.

public static System.Windows.Forms.VisualStyles.VisualStyleElement SortedDown { get; }


member this.SortedDown : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing sort arrow.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the SortedDown property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementHeaderSortArrow2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderSortArrow2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.SortArrow.SortedDown))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.SortArrow.SortedDown);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.SortArrow.SortedDown",
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));
}

Remarks
You can use the VisualStyleElement returned by the SortedDown property to create a VisualStyleRenderer.
VisualStyleElement.Header.SortArrow.SortedUp Visual
StyleElement.Header.SortArrow.SortedUp
I n this Article
Gets a visual style element that represents an upward-pointing sort arrow.

public static System.Windows.Forms.VisualStyles.VisualStyleElement SortedUp { get; }


member this.SortedUp : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing sort arrow.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the SortedUp property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementHeaderSortArrow1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementHeaderSortArrow1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Header.SortArrow.SortedUp))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Header.SortArrow.SortedUp);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Header.SortArrow.SortedUp",
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));
}

Remarks
You can use the VisualStyleElement returned by the SortedUp property to create a VisualStyleRenderer.
VisualStyleElement.ListView VisualStyleElement.ListView
Class
Contains classes that provide VisualStyleElement objects for the parts of the list view control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ListView
type VisualStyleElement.ListView = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.ListView class provides a foundation in which the following classes are defined:
VisualStyleElement.ListView.Detail
VisualStyleElement.ListView.EmptyText
VisualStyleElement.ListView.Group
VisualStyleElement.ListView.Item
VisualStyleElement.ListView.SortedDetail
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the list view
part specified by the class name.
VisualStyleElement.ListView.Detail VisualStyleElement.
ListView.Detail Class
Provides a VisualStyleElement for a list view in detail view. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ListView.Detail
type VisualStyleElement.ListView.Detail = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ListView.Detail class returns a VisualStyleElement that represents a list
view in detail view.

Properties
Normal
Normal

Gets a visual style element that represents a list view in detail view.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ListView.Detail.Normal VisualStyle
Element.ListView.Detail.Normal
I n this Article
Gets a visual style element that represents a list view in detail view.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a list view in detail view.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewDetail1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewDetail1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.Detail.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.Detail.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.Detail.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ListView.EmptyText VisualStyle
Element.ListView.EmptyText Class
Provides a VisualStyleElement for the text area of a list view that contains no items. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ListView.EmptyText
type VisualStyleElement.ListView.EmptyText = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ListView.EmptyText class returns a VisualStyleElement that represents
the text area that accompanies an empty list view.

Properties
Normal
Normal

Gets a visual style element that represents the text area of a list view that contains no items.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ListView.EmptyText.Normal Visual
StyleElement.ListView.EmptyText.Normal
I n this Article
Gets a visual style element that represents the text area of a list view that contains no items.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the text area that accompanies an empty list view.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewEmptyText1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewEmptyText1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.EmptyText.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.EmptyText.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.EmptyText.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ListView.Group VisualStyleElement.
ListView.Group Class
Provides a VisualStyleElement for a list view item group. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ListView.Group
type VisualStyleElement.ListView.Group = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ListView.Group class returns a VisualStyleElement that represents a
list view item group.

Properties
Normal
Normal

Gets a visual style element that represents a list view item group.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ListView.Group.Normal VisualStyle
Element.ListView.Group.Normal
I n this Article
Gets a visual style element that represents a list view item group.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a group of list view items.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewGroup1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewGroup1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.Group.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.Group.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.Group.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ListView.Item VisualStyleElement.List
View.Item Class
Provides VisualStyleElement objects for each state of an item of the list view control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ListView.Item
type VisualStyleElement.ListView.Item = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ListView.Item class returns a VisualStyleElement for a different state of a list
view item.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled list view item.

Hot
Hot

Gets a visual style element that represents a hot list view item.

Normal
Normal

Gets a visual style element that represents a normal list view item.

Selected
Selected

Gets a visual style element that represents a selected list view item that has focus.

SelectedNotFocus
SelectedNotFocus

Gets a visual style element that represents a selected list view item without focus.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ListView.Item.Disabled VisualStyle
Element.ListView.Item.Disabled
I n this Article
Gets a visual style element that represents a disabled list view item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled list view item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewItem4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewItem4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.Item.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.Item.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.Item.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ListView.Item.Hot VisualStyleElement.
ListView.Item.Hot
I n this Article
Gets a visual style element that represents a hot list view item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot list view item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewItem2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewItem2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.Item.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.Item.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.Item.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ListView.Item.Normal VisualStyle
Element.ListView.Item.Normal
I n this Article
Gets a visual style element that represents a normal list view item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal list view item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewItem1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewItem1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.Item.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.Item.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.Item.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ListView.Item.Selected VisualStyle
Element.ListView.Item.Selected
I n this Article
Gets a visual style element that represents a selected list view item that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Selected { get; }


member this.Selected : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a selected list view item that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Selected property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewItem3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewItem3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.Item.Selected))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.Item.Selected);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.Item.Selected",
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));
}

Remarks
You can use the VisualStyleElement returned by the Selected property to create a VisualStyleRenderer.
VisualStyleElement.ListView.Item.SelectedNotFocus
VisualStyleElement.ListView.Item.SelectedNotFocus
I n this Article
Gets a visual style element that represents a selected list view item without focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement SelectedNotFocus { get; }


member this.SelectedNotFocus : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a selected list view item without focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the SelectedNotFocus property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElementListViewItem5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewItem5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.Item.SelectedNotFocus))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.Item.SelectedNotFocus);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.Item.SelectedNotFocus",
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));
}

Remarks
You can use the VisualStyleElement returned by the SelectedNotFocus property to create a VisualStyleRenderer.
VisualStyleElement.ListView.SortedDetail VisualStyle
Element.ListView.SortedDetail Class
Provides a VisualStyleElement for a sorted list view control in detail view This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ListView.SortedDetail
type VisualStyleElement.ListView.SortedDetail = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ListView.SortedDetail class returns a VisualStyleElement that
represents a sorted list view control in detail view.

Properties
Normal
Normal

Gets a visual style element that represents a sorted list view control in detail view.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ListView.SortedDetail.Normal Visual
StyleElement.ListView.SortedDetail.Normal
I n this Article
Gets a visual style element that represents a sorted list view control in detail view.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a sorted list view control in detail view.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementListViewSortedDetail1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementListViewSortedDetail1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ListView.SortedDetail.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ListView.SortedDetail.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ListView.SortedDetail.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Menu VisualStyleElement.Menu Class
Contains classes that provide VisualStyleElement objects for the parts of a menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Menu
type VisualStyleElement.Menu = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Menu class provides a foundation in which the following classes are defined:
VisualStyleElement.Menu.BarDropDown
VisualStyleElement.Menu.BarItem
VisualStyleElement.Menu.Chevron
VisualStyleElement.Menu.DropDown
VisualStyleElement.Menu.Item
VisualStyleElement.Menu.Separator
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the menu part
specified by the class name.
VisualStyleElement.Menu.BarDropDown VisualStyle
Element.Menu.BarDropDown Class
Provides a VisualStyleElement for the drop-down arrow of a menu bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Menu.BarDropDown
type VisualStyleElement.Menu.BarDropDown = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Menu.BarDropDown class returns a VisualStyleElement that
represents the drop-down arrow of a menu bar.

Properties
Normal
Normal

Gets a visual style element that represents the drop-down arrow of a menu bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Menu.BarDropDown.Normal Visual
StyleElement.Menu.BarDropDown.Normal
I n this Article
Gets a visual style element that represents the drop-down arrow of a menu bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the drop-down arrow of a menu bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuBarDropDown1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementMenuBarDropDown1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.BarDropDown.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.BarDropDown.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.BarDropDown.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Menu.BarItem VisualStyleElement.
Menu.BarItem Class
Provides a VisualStyleElement for a menu bar item. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Menu.BarItem
type VisualStyleElement.Menu.BarItem = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Menu.BarItem class returns a VisualStyleElement that represents a
menu bar item.

Properties
Normal
Normal

Gets a visual style element that represents a menu bar item.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Menu.BarItem.Normal VisualStyle
Element.Menu.BarItem.Normal
I n this Article
Gets a visual style element that represents a menu bar item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a menu bar item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuBarItem1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementMenuBarItem1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.BarItem.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.BarItem.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.BarItem.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Menu.Chevron VisualStyleElement.
Menu.Chevron Class
Provides a VisualStyleElement for the chevron of a menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Menu.Chevron
type VisualStyleElement.Menu.Chevron = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Menu.Chevron class gets a VisualStyleElement that represents the
chevron of a menu.

Properties
Normal
Normal

Gets a visual style element that represents a menu chevron.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Menu.Chevron.Normal VisualStyle
Element.Menu.Chevron.Normal
I n this Article
Gets a visual style element that represents a menu chevron.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a menu chevron.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuChevron1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementMenuChevron1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.Chevron.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.Chevron.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.Chevron.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Menu.DropDown VisualStyleElement.
Menu.DropDown Class
Provides a VisualStyleElement for the drop-down arrow of a menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Menu.DropDown
type VisualStyleElement.Menu.DropDown = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Menu.DropDown class gets a VisualStyleElement that represents the
drop-down arrow of a menu.

Properties
Normal
Normal

Gets a visual style element that represents the drop-down arrow of a menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Menu.DropDown.Normal VisualStyle
Element.Menu.DropDown.Normal
I n this Article
Gets a visual style element that represents the drop-down arrow of a menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the drop-down arrow of a menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuDropDown1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementMenuDropDown1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.DropDown.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.DropDown.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.DropDown.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Menu.Item VisualStyleElement.Menu.
Item Class
Provides VisualStyleElement objects for each state of a menu item. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Menu.Item
type VisualStyleElement.Menu.Item = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Menu.Item class returns a VisualStyleElement for a different state of a menu
item.

Properties
Demoted
Demoted

Gets a visual style element that represents a menu item that has been demoted.

Normal
Normal

Gets a visual style element that represents a menu item in the normal state.

Selected
Selected

Gets a visual style element that represents a menu item in the selected state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Menu.Item.Demoted VisualStyle
Element.Menu.Item.Demoted
I n this Article
Gets a visual style element that represents a menu item that has been demoted.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Demoted { get; }


member this.Demoted : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a menu item that has been demoted.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Demoted property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementMenuItem3 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementMenuItem3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.Item.Demoted))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.Item.Demoted);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.Item.Demoted",
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));
}

Remarks
You can use the VisualStyleElement returned by the Demoted property to create a VisualStyleRenderer.
VisualStyleElement.Menu.Item.Normal VisualStyle
Element.Menu.Item.Normal
I n this Article
Gets a visual style element that represents a menu item in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a menu item in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuItem1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementMenuItem1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.Item.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.Item.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.Item.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Menu.Item.Selected VisualStyle
Element.Menu.Item.Selected
I n this Article
Gets a visual style element that represents a menu item in the selected state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Selected { get; }


member this.Selected : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a menu item in the selected state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Selected property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuItem2 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementMenuItem2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.Item.Selected))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.Item.Selected);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.Item.Selected",
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));
}

Remarks
You can use the VisualStyleElement returned by the Selected property to create a VisualStyleRenderer.
VisualStyleElement.Menu.Separator VisualStyleElement.
Menu.Separator Class
Provides a VisualStyleElement for a menu item separator. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Menu.Separator
type VisualStyleElement.Menu.Separator = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Menu.Separator class returns a VisualStyleElement that represents a
separator between menu items.

Properties
Normal
Normal

Gets a visual style element that represents a menu item separator.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Menu.Separator.Normal VisualStyle
Element.Menu.Separator.Normal
I n this Article
Gets a visual style element that represents a menu item separator.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a menu item separator.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuSeparator1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementMenuSeparator1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Menu.Separator.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Menu.Separator.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Menu.Separator.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.MenuBand VisualStyleElement.Menu
Band Class
Contains classes that provide VisualStyleElement objects for the parts of a menu band. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.MenuBand
type VisualStyleElement.MenuBand = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.MenuBand class provides a foundation in which the following classes are defined:
VisualStyleElement.MenuBand.NewApplicationButton
VisualStyleElement.MenuBand.Separator
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the menu
band part specified by the class name.
VisualStyleElement.MenuBand.NewApplicationButton
VisualStyleElement.MenuBand.NewApplicationButton
Class
Provides VisualStyleElement objects for each state of the new application button of a menu band. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.MenuBand.NewApplicationButton
type VisualStyleElement.MenuBand.NewApplicationButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.MenuBand.NewApplicationButton class returns a VisualStyleElement for a
different state of the new application button of a menu band.

Properties
Checked
Checked

Gets a visual style element that represents the new application button in the checked state.

Disabled
Disabled

Gets a visual style element that represents the new application button in the disabled state.

Hot
Hot

Gets a visual style element that represents the new application button in the hot state.

HotChecked
HotChecked

Gets a visual style element that represents the new application button in the hot and checked states.

Normal
Normal

Gets a visual style element that represents the new application button in the normal state.
Pressed
Pressed

Gets a visual style element that represents the new application button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.MenuBand.NewApplicationButton.
Checked VisualStyleElement.MenuBand.NewApplication
Button.Checked
I n this Article
Gets a visual style element that represents the new application button in the checked state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Checked { get; }
member this.Checked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the new application button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Checked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuBandNewApplicationButton5 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementMenuBandNewApplicationButton5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.MenuBand.NewApplicationButton.Checked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.MenuBand.NewApplicationButton.Checked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.MenuBand.NewApplicationButton.Checked",
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));
}

Remarks
You can use the VisualStyleElement returned by the Checked property to create a VisualStyleRenderer.
VisualStyleElement.MenuBand.NewApplicationButton.
Disabled VisualStyleElement.MenuBand.NewApplication
Button.Disabled
I n this Article
Gets a visual style element that represents the new application button in the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the new application button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuBandNewApplicationButton4 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementMenuBandNewApplicationButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.MenuBand.NewApplicationButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.MenuBand.NewApplicationButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.MenuBand.NewApplicationButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.MenuBand.NewApplicationButton.
Hot VisualStyleElement.MenuBand.NewApplication
Button.Hot
I n this Article
Gets a visual style element that represents the new application button in the hot state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the new application button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_PushButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.PushButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.PushButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.MenuBand.NewApplicationButton.
HotChecked VisualStyleElement.MenuBand.New
ApplicationButton.HotChecked
I n this Article
Gets a visual style element that represents the new application button in the hot and checked states.
public static System.Windows.Forms.VisualStyles.VisualStyleElement HotChecked { get; }
member this.HotChecked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the new application button in the hot and checked states.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the HotChecked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementMenuBandNewApplicationButton6 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementMenuBandNewApplicationButton6(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.MenuBand.NewApplicationButton.HotChecked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.MenuBand.NewApplicationButton.HotChecked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.MenuBand.NewApplicationButton.HotChecked",
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));
}

Remarks
You can use the VisualStyleElement returned by the HotChecked property to create a VisualStyleRenderer.
VisualStyleElement.MenuBand.NewApplicationButton.
Normal VisualStyleElement.MenuBand.NewApplication
Button.Normal
I n this Article
Gets a visual style element that represents the new application button in the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the new application button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuBandNewApplicationButton1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementMenuBandNewApplicationButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.MenuBand.NewApplicationButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.MenuBand.NewApplicationButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.MenuBand.NewApplicationButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.MenuBand.NewApplicationButton.
Pressed VisualStyleElement.MenuBand.NewApplication
Button.Pressed
I n this Article
Gets a visual style element that represents the new application button in the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the new application button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuBandNewApplicationButton3 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementMenuBandNewApplicationButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.MenuBand.NewApplicationButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.MenuBand.NewApplicationButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.MenuBand.NewApplicationButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.MenuBand.Separator VisualStyle
Element.MenuBand.Separator Class
Provides a VisualStyleElement for a menu band separator. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.MenuBand.Separator
type VisualStyleElement.MenuBand.Separator = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.MenuBand.Separator class returns a VisualStyleElement that
represents a separator between items in a menu band.

Properties
Normal
Normal

Gets a visual style element that represents a separator between items in a menu band.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.MenuBand.Separator.Normal Visual
StyleElement.MenuBand.Separator.Normal
I n this Article
Gets a visual style element that represents a separator between items in a menu band.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a separator between items in a menu band.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementMenuBandSeparator1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementMenuBandSeparator1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.MenuBand.Separator.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.MenuBand.Separator.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.MenuBand.Separator.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Page VisualStyleElement.Page Class
Contains classes that provide VisualStyleElement objects for the parts of a page. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Page
type VisualStyleElement.Page = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Page class provides a foundation in which the following classes are defined:
VisualStyleElement.Page.Down
VisualStyleElement.Page.DownHorizontal
VisualStyleElement.Page.Up
VisualStyleElement.Page.UpHorizontal
Each of these classes provides one or more properties that return a VisualStyleElement for the part of the page
specified by the class name.
VisualStyleElement.Page.Down VisualStyleElement.Page.
Down Class
Provides VisualStyleElement objects for each state of a down indicator in an up-down or spin box control. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Page.Down
type VisualStyleElement.Page.Down = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Page.Down class gets a VisualStyleElement for the different state of a down
indicator in an up-down or spin box control.

Properties
Disabled
Disabled

Gets a visual style element that represents the disabled state of the down indicator in an up-down or spin box
control.

Hot
Hot

Gets a visual style element that represents a down indicator of an up-down or spin box control in the hot state.

Normal
Normal

Gets a visual style element that represents the down indicator of an up-down or spin box control in the normal
state.

Pressed
Pressed

Gets a visual style element that represents the down indicator of an up-down or spin box in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Page.Down.Disabled VisualStyle
Element.Page.Down.Disabled
I n this Article
Gets a visual style element that represents the disabled state of the down indicator in an up-down or spin box control.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a down indicator of an up-down or spin box control in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Down4 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Down4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Down.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Down.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Down.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Page.Down.Hot VisualStyleElement.
Page.Down.Hot
I n this Article
Gets a visual style element that represents a down indicator of an up-down or spin box control in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the down indicator of an up-down or spin box in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Down2 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Down2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Down.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Down.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Down.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Page.Down.Normal VisualStyle
Element.Page.Down.Normal
I n this Article
Gets a visual style element that represents the down indicator of an up-down or spin box control in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a down indicator up an up-down or spin box control in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Down1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Down1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Down.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Down.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Down.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Page.Down.Pressed VisualStyle
Element.Page.Down.Pressed
I n this Article
Gets a visual style element that represents the down indicator of an up-down or spin box in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a down indicator of an up-down or spin box in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Down3 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Down3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Down.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Down.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Down.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Page.DownHorizontal VisualStyle
Element.Page.DownHorizontal Class
Provides VisualStyleElement objects for each state of a page backward indicator in a pager control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Page.DownHorizontal
type VisualStyleElement.Page.DownHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Page.DownHorizontal class returns a VisualStyleElement for a different state
of a page backward indicator of a pager control.

Properties
Disabled
Disabled

Gets a visual style element that represents a page backward indicator of a pager control in the disabled state.

Hot
Hot

Gets a visual style element that represents a page backward indicator of a pager control in the hot state.

Normal
Normal

Gets a visual style element that represents a page backward indicator of a pager control in the normal state.

Pressed
Pressed

Gets a visual style element that represents a page backward indicator of a pager control in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Page.DownHorizontal.Disabled Visual
StyleElement.Page.DownHorizontal.Disabled
I n this Article
Gets a visual style element that represents a page backward indicator of a pager control in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page backward indicator of a pager control in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_DownHorizontal4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_DownHorizontal4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.DownHorizontal.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.DownHorizontal.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.DownHorizontal.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Page.DownHorizontal.Hot VisualStyle
Element.Page.DownHorizontal.Hot
I n this Article
Gets a visual style element that represents a page backward indicator of a pager control in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page backward indicator of a pager control in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_DownHorizontal2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_DownHorizontal2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.DownHorizontal.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.DownHorizontal.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.DownHorizontal.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Page.DownHorizontal.Normal Visual
StyleElement.Page.DownHorizontal.Normal
I n this Article
Gets a visual style element that represents a page backward indicator of a pager control in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page backward indicator of a pager control in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_DownHorizontal1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_DownHorizontal1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.DownHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.DownHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Page.DownHorizontal.Pressed Visual
StyleElement.Page.DownHorizontal.Pressed
I n this Article
Gets a visual style element that represents a page backward indicator of a pager control in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents page backward indicator of a pager control in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_DownHorizontal3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_DownHorizontal3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.DownHorizontal.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.DownHorizontal.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.DownHorizontal.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Page.Up VisualStyleElement.Page.Up
Class
Provides VisualStyleElement objects for each state of a page up indicator of an up-down or spin box control. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Page.Up
type VisualStyleElement.Page.Up = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Page.Up class returns a VisualStyleElement for a different state of a page up
indicator of an up-down or spin box control.

Properties
Disabled
Disabled

Gets a visual style element that represents a page up indicator of an up-down or spin box control in the disabled
state.

Hot
Hot

Gets a visual style element that represents a page up indicator of an up-down or spin box control in the hot state.

Normal
Normal

Gets a visual style element that represents a page up indicator of an up-down or spin box control in the normal
state.

Pressed
Pressed

Gets a visual style element that represents a page up indicator of an up-down or spin box control in the pressed
state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Page.Up.Disabled VisualStyleElement.
Page.Up.Disabled
I n this Article
Gets a visual style element that represents a page up indicator of an up-down or spin box control in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page up indicator of an up-down or spin box control in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Up4 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Up4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Up.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Up.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Up.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Page.Up.Hot VisualStyleElement.
Page.Up.Hot
I n this Article
Gets a visual style element that represents a page up indicator of an up-down or spin box control in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page up indicator of an up-down or spin box control in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Up1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Up2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Up.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Up.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Up.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Page.Up.Normal VisualStyleElement.
Page.Up.Normal
I n this Article
Gets a visual style element that represents a page up indicator of an up-down or spin box control in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page up indicator of an up-down or spin box control in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Up1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Up1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Up.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Up.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Up.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Page.Up.Pressed VisualStyleElement.
Page.Up.Pressed
I n this Article
Gets a visual style element that represents a page up indicator of an up-down or spin box control in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page up indicator of an up-down or spin box control in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_Up3 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Page_Up3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.Up.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.Up.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.Up.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Page.UpHorizontal VisualStyle
Element.Page.UpHorizontal Class
Provides VisualStyleElement objects for each state of a page forward indicator of a pager control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Page.UpHorizontal
type VisualStyleElement.Page.UpHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Page.UpHorizontal class returns a VisualStyleElement for a different state of a
page forward indicator of a pager control.

Properties
Disabled
Disabled

Gets a visual style element that represents a page forward indicator of a pager control in the disabled state.

Hot
Hot

Gets a visual style element that represents a page forward indicator of a pager control in the hot state.

Normal
Normal

Gets a visual style element that represents a page forward indicator of a pager control in the normal state.

Pressed
Pressed

Gets a visual style element that represents a page forward indicator of a pager control in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Page.UpHorizontal.Disabled Visual
StyleElement.Page.UpHorizontal.Disabled
I n this Article
Gets a visual style element that represents a page forward indicator of a pager control in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page forward indicator of a pager control in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_UpHorizontal4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_UpHorizontal4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.UpHorizontal.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.UpHorizontal.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.UpHorizontal.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Page.UpHorizontal.Hot VisualStyle
Element.Page.UpHorizontal.Hot
I n this Article
Gets a visual style element that represents a page forward indicator of a pager control in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page forward indicator of a pager control in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_UpHorizontal2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_UpHorizontal2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.UpHorizontal.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.UpHorizontal.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.UpHorizontal.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Page.UpHorizontal.Normal Visual
StyleElement.Page.UpHorizontal.Normal
I n this Article
Gets a visual style element that represents a page forward indicator of a pager control in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page forward indicator of a pager control in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_UpHorizontal1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_UpHorizontal1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.UpHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.UpHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.UpHorizontal.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Page.UpHorizontal.Pressed Visual
StyleElement.Page.UpHorizontal.Pressed
I n this Article
Gets a visual style element that represents a page forward indicator of a pager control in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a page forward indicator of a pager control in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Page_UpHorizontal3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Page_UpHorizontal3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Page.UpHorizontal.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Page.UpHorizontal.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Page.UpHorizontal.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ProgressBar VisualStyleElement.
ProgressBar Class
Contains classes that provide VisualStyleElement objects for the parts of the progress bar control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ProgressBar
type VisualStyleElement.ProgressBar = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.ProgressBar class provides a foundation in which the following classes are defined:
VisualStyleElement.ProgressBar.Bar
VisualStyleElement.ProgressBar.BarVertical
VisualStyleElement.ProgressBar.Chunk
VisualStyleElement.ProgressBar.ChunkVertical
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the progress
bar part specified by the class name.
VisualStyleElement.ProgressBar.Bar VisualStyleElement.
ProgressBar.Bar Class
Provides a VisualStyleElement for the frame of a horizontal progress bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ProgressBar.Bar
type VisualStyleElement.ProgressBar.Bar = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ProgressBar.Bar class returns a VisualStyleElement that represents the
frame of a progress bar that fills in horizontally.

Properties
Normal
Normal

Gets a visual style element that represents a horizontal progress bar frame.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ProgressBar.Bar.Normal VisualStyle
Element.ProgressBar.Bar.Normal
I n this Article
Gets a visual style element that represents a horizontal progress bar frame.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal progress bar frame.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementProgressBarBar1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementProgressBarBar1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ProgressBar.Bar.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ProgressBar.Bar.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ProgressBar.Bar.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ProgressBar.BarVertical VisualStyle
Element.ProgressBar.BarVertical Class
Provides a VisualStyleElement for the frame of a vertical progress bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ProgressBar.BarVertical
type VisualStyleElement.ProgressBar.BarVertical = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ProgressBar.BarVertical class returns a VisualStyleElement that
represents the frame of a progress bar that fills in vertically.

Properties
Normal
Normal

Gets a visual style element that represents a vertical progress bar frame.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ProgressBar.BarVertical.Normal Visual
StyleElement.ProgressBar.BarVertical.Normal
I n this Article
Gets a visual style element that represents a vertical progress bar frame.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical progress bar frame.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementProgressBarBarVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementProgressBarBarVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ProgressBar.BarVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ProgressBar.BarVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ProgressBar.BarVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ProgressBar.Chunk VisualStyle
Element.ProgressBar.Chunk Class
Provides a VisualStyleElement for the pieces that fill a horizontal progress bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ProgressBar.Chunk
type VisualStyleElement.ProgressBar.Chunk = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ProgressBar.Chunk class returns a VisualStyleElement that represents
the pieces that fill a horizontal progress bar.

Properties
Normal
Normal

Gets a visual style element that represents the pieces that fill a horizontal progress bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ProgressBar.Chunk.Normal Visual
StyleElement.ProgressBar.Chunk.Normal
I n this Article
Gets a visual style element that represents the pieces that fill a horizontal progress bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the pieces that fill a horizontal progress bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementProgressBarChunk1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementProgressBarChunk1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ProgressBar.Chunk.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ProgressBar.Chunk.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ProgressBar.Chunk.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ProgressBar.ChunkVertical VisualStyle
Element.ProgressBar.ChunkVertical Class
Provides a VisualStyleElement for the pieces that fill a vertical progress bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ProgressBar.ChunkVertical
type VisualStyleElement.ProgressBar.ChunkVertical = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ProgressBar.ChunkVertical class returns a VisualStyleElement that
represents the pieces that fill a vertical progress bar.

Properties
Normal
Normal

Gets a visual style element that represents the pieces that fill a vertical progress bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ProgressBar.ChunkVertical.Normal
VisualStyleElement.ProgressBar.ChunkVertical.Normal
I n this Article
Gets a visual style element that represents the pieces that fill a vertical progress bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the pieces that fill a vertical progress bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementProgressBarChunkVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementProgressBarChunkVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ProgressBar.ChunkVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ProgressBar.ChunkVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ProgressBar.ChunkVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Rebar VisualStyleElement.Rebar Class
Contains classes that provide VisualStyleElement objects for the parts of the rebar control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Rebar
type VisualStyleElement.Rebar = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Rebar class provides a foundation in which the following classes are defined:
VisualStyleElement.Rebar.Band
VisualStyleElement.Rebar.Chevron
VisualStyleElement.Rebar.ChevronVertical
VisualStyleElement.Rebar.Gripper
VisualStyleElement.Rebar.GripperVertical
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the rebar part
specified by the class name.
VisualStyleElement.Rebar.Band VisualStyleElement.Rebar.
Band Class
Provides a VisualStyleElement for a rebar band. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Rebar.Band
type VisualStyleElement.Rebar.Band = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Rebar.Band class returns a VisualStyleElement that represents a rebar
band.

Properties
Normal
Normal

Gets a visual style element that represents a rebar band.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Rebar.Band.Normal VisualStyle
Element.Rebar.Band.Normal
I n this Article
Gets a visual style element that represents a rebar band.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a rebar band.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarBand1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementRebarBand1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.Band.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.Band.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.Band.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.Chevron VisualStyleElement.
Rebar.Chevron Class
Provides VisualStyleElement objects for each state of a horizontal chevron. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Rebar.Chevron
type VisualStyleElement.Rebar.Chevron = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Rebar.Chevron class returns a VisualStyleElement for a different state of a
horizontal chevron.

Properties
Hot
Hot

Gets a visual style element that represents a hot chevron.

Normal
Normal

Gets a visual style element that represents a normal chevron.

Pressed
Pressed

Gets a visual style element that represents a pressed chevron.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Rebar.Chevron.Hot VisualStyle
Element.Rebar.Chevron.Hot
I n this Article
Gets a visual style element that represents a hot chevron.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot chevron.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarChevron2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementRebarChevron2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.Chevron.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.Chevron.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.Chevron.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.Chevron.Normal VisualStyle
Element.Rebar.Chevron.Normal
I n this Article
Gets a visual style element that represents a normal chevron.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal chevron.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarChevron1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementRebarChevron1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.Chevron.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.Chevron.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.Chevron.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.Chevron.Pressed VisualStyle
Element.Rebar.Chevron.Pressed
I n this Article
Gets a visual style element that represents a pressed chevron.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed chevron.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarChevron3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementRebarChevron3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.Chevron.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.Chevron.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.Chevron.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.ChevronVertical VisualStyle
Element.Rebar.ChevronVertical Class
Provides VisualStyleElement objects for each state of a chevron. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Rebar.ChevronVertical
type VisualStyleElement.Rebar.ChevronVertical = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Rebar.ChevronVertical class returns a VisualStyleElement for a different state
of a chevron.

Properties
Hot
Hot

Gets a visual style element that represents a hot chevron.

Normal
Normal

Gets a visual style element that represents a normal chevron.

Pressed
Pressed

Gets a visual style element that represents a pressed chevron.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Rebar.ChevronVertical.Hot VisualStyle
Element.Rebar.ChevronVertical.Hot
I n this Article
Gets a visual style element that represents a hot chevron.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot chevron.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarChevronVertical2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementRebarChevronVertical2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.ChevronVertical.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.ChevronVertical.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.ChevronVertical.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.ChevronVertical.Normal Visual
StyleElement.Rebar.ChevronVertical.Normal
I n this Article
Gets a visual style element that represents a normal chevron.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal chevron.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarChevronVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementRebarChevronVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.ChevronVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.ChevronVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.ChevronVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.ChevronVertical.Pressed Visual
StyleElement.Rebar.ChevronVertical.Pressed
I n this Article
Gets a visual style element that represents a pressed chevron.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed chevron.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarChevronVertical3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementRebarChevronVertical3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.ChevronVertical.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.ChevronVertical.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.ChevronVertical.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.Gripper VisualStyleElement.
Rebar.Gripper Class
Provides a VisualStyleElement for the gripper bar of a horizontal rebar control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Rebar.Gripper
type VisualStyleElement.Rebar.Gripper = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Rebar.Gripper class returns a VisualStyleElement that represents the
gripper bar for a horizontal rebar.

Properties
Normal
Normal

Gets a visual style element that represents a gripper bar for a horizontal rebar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Rebar.Gripper.Normal VisualStyle
Element.Rebar.Gripper.Normal
I n this Article
Gets a visual style element that represents a gripper bar for a horizontal rebar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a gripper bar for a horizontal rebar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarGripper1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementRebarGripper1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Rebar.Gripper.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Rebar.Gripper.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Rebar.Gripper.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Rebar.GripperVertical VisualStyle
Element.Rebar.GripperVertical Class
Provides a VisualStyleElement for the gripper bar of a vertical rebar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Rebar.GripperVertical
type VisualStyleElement.Rebar.GripperVertical = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Rebar.GripperVertical class returns a VisualStyleElement that
represents the gripper bar of a vertical rebar.

Properties
Normal
Normal

Gets a visual style element that represents a gripper bar for a vertical rebar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Rebar.GripperVertical.Normal Visual
StyleElement.Rebar.GripperVertical.Normal
I n this Article
Gets a visual style element that represents a gripper bar for a vertical rebar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a gripper bar for a vertical rebar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementRebarGripperVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
System.Windows.Forms.VisualStyleElementsExamples#206

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar VisualStyleElement.ScrollBar
Class
Contains classes that provide VisualStyleElement objects for the parts of the scroll bar control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ScrollBar
type VisualStyleElement.ScrollBar = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.ScrollBar class provides a foundation in which the following classes are defined:
VisualStyleElement.ScrollBar.ArrowButton
VisualStyleElement.ScrollBar.GripperHorizontal
VisualStyleElement.ScrollBar.GripperVertical
VisualStyleElement.ScrollBar.LeftTrackHorizontal
VisualStyleElement.ScrollBar.LowerTrackVertical
VisualStyleElement.ScrollBar.RightTrackHorizontal
VisualStyleElement.ScrollBar.SizeBox
VisualStyleElement.ScrollBar.ThumbButtonHorizontal
VisualStyleElement.ScrollBar.ThumbButtonVertical
VisualStyleElement.ScrollBar.UpperTrackVertical
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the scroll bar
part specified by the class name.
VisualStyleElement.ScrollBar.ArrowButton VisualStyle
Element.ScrollBar.ArrowButton Class
Provides VisualStyleElement objects for each state and direction of a scroll arrow. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.ArrowButton
type VisualStyleElement.ScrollBar.ArrowButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.ArrowButton class returns a VisualStyleElement for a different state
and direction of a scroll arrow.

Properties
DownDisabled
DownDisabled

Gets a visual style element that represents a downward-pointing scroll arrow in the disabled state.

DownHot
DownHot

Gets a visual style element that represents a downward-pointing scroll arrow in the hot state.

DownNormal
DownNormal

Gets a visual style element that represents a downward-pointing scroll arrow in the normal state.

DownPressed
DownPressed

Gets a visual style element that represents a downward-pointing scroll arrow in the pressed state.

LeftDisabled
LeftDisabled

Gets a visual style element that represents a left-pointing scroll arrow in the disabled state.

LeftHot
LeftHot

Gets a visual style element that represents a left-pointing scroll arrow in the hot state.

LeftNormal
LeftNormal

Gets a visual style element that represents a left-pointing scroll arrow in the normal state.

LeftPressed
LeftPressed

Gets a visual style element that represents a left-pointing scroll arrow in the pressed state.

RightDisabled
RightDisabled

Gets a visual style element that represents a right-pointing scroll arrow in the disabled state.

RightHot
RightHot

Gets a visual style element that represents a right-pointing scroll arrow in the hot state.

RightNormal
RightNormal

Gets a visual style element that represents a right-pointing scroll arrow in the normal state.

RightPressed
RightPressed

Gets a visual style element that represents a right-pointing scroll arrow in the pressed state.

UpDisabled
UpDisabled

Gets a visual style element that represents an upward-pointing scroll arrow in the disabled state.

UpHot
UpHot

Gets a visual style element that represents an upward-pointing scroll arrow in the hot state.
UpNormal
UpNormal

Gets a visual style element that represents an upward-pointing scroll arrow in the normal state.

UpPressed
UpPressed

Gets a visual style element that represents an upward-pointing scroll arrow in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.ArrowButton.DownDisabled
VisualStyleElement.ScrollBar.ArrowButton.DownDisabled
I n this Article
Gets a visual style element that represents a downward-pointing scroll arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement DownDisabled { get; }


member this.DownDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing scroll arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the DownDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementScrollBarArrowButton8 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton8(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.DownDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.DownDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.DownDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the DownDisabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.DownHot
VisualStyleElement.ScrollBar.ArrowButton.DownHot
I n this Article
Gets a visual style element that represents a downward-pointing scroll arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement DownHot { get; }


member this.DownHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing scroll arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the DownHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementScrollBarArrowButton6 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.DownHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.DownHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.DownHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the DownHot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.DownNormal
VisualStyleElement.ScrollBar.ArrowButton.DownNormal
I n this Article
Gets a visual style element that represents a downward-pointing scroll arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement DownNormal { get; }


member this.DownNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing scroll arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the DownNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementScrollBarArrowButton5 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.DownNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.DownNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.DownNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the DownNormal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.DownPressed
VisualStyleElement.ScrollBar.ArrowButton.DownPressed
I n this Article
Gets a visual style element that represents a downward-pointing scroll arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement DownPressed { get; }


member this.DownPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing scroll arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the DownPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementScrollBarArrowButton7 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton7(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.DownPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.DownPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.DownPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the DownPressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.LeftDisabled
VisualStyleElement.ScrollBar.ArrowButton.LeftDisabled
I n this Article
Gets a visual style element that represents a left-pointing scroll arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement LeftDisabled { get; }


member this.LeftDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing scroll arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the LeftDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementScrollBarArrowButton12 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton12(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.LeftDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.LeftDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.LeftDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the LeftDisabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.LeftHot Visual
StyleElement.ScrollBar.ArrowButton.LeftHot
I n this Article
Gets a visual style element that represents a left-pointing scroll arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement LeftHot { get; }


member this.LeftHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing scroll arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the LeftHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarArrowButton10 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton10(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.LeftHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.LeftHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.LeftHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the LeftHot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.LeftNormal
VisualStyleElement.ScrollBar.ArrowButton.LeftNormal
I n this Article
Gets a visual style element that represents a left-pointing scroll arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement LeftNormal { get; }


member this.LeftNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing scroll arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the LeftNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementScrollBarArrowButton9 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton9(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.LeftNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.LeftNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.LeftNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the LeftNormal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.LeftPressed
VisualStyleElement.ScrollBar.ArrowButton.LeftPressed
I n this Article
Gets a visual style element that represents a left-pointing scroll arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement LeftPressed { get; }


member this.LeftPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing scroll arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the LeftPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementScrollBarArrowButton11 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton11(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.LeftPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.LeftPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.LeftPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the LeftPressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.RightDisabled
VisualStyleElement.ScrollBar.ArrowButton.RightDisabled
I n this Article
Gets a visual style element that represents a right-pointing scroll arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement RightDisabled { get; }


member this.RightDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing scroll arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the RightDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementScrollBarArrowButton16 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton16(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.RightDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.RightDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.RightDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the RightDisabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.RightHot
VisualStyleElement.ScrollBar.ArrowButton.RightHot
I n this Article
Gets a visual style element that represents a right-pointing scroll arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement RightHot { get; }


member this.RightHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing scroll arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the RightHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarArrowButton14 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton14(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.RightHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.RightHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.RightHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the RightHot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.RightNormal
VisualStyleElement.ScrollBar.ArrowButton.RightNormal
I n this Article
Gets a visual style element that represents a right-pointing scroll arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement RightNormal { get; }


member this.RightNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing scroll arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the RightNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementScrollBarArrowButton13 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton13(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.RightNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.RightNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.RightNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the RightNormal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.RightPressed
VisualStyleElement.ScrollBar.ArrowButton.RightPressed
I n this Article
Gets a visual style element that represents a right-pointing scroll arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement RightPressed { get; }


member this.RightPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing scroll arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the RightPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and
call the DrawVisualStyleElementScrollBarArrowButton15 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton15(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.RightPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.RightPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.RightPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the RightPressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.UpDisabled
VisualStyleElement.ScrollBar.ArrowButton.UpDisabled
I n this Article
Gets a visual style element that represents an upward-pointing scroll arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UpDisabled { get; }


member this.UpDisabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing scroll arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UpDisabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementScrollBarArrowButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.UpDisabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.UpDisabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.UpDisabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the UpDisabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.UpHot Visual
StyleElement.ScrollBar.ArrowButton.UpHot
I n this Article
Gets a visual style element that represents an upward-pointing scroll arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UpHot { get; }


member this.UpHot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing scroll arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UpHot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarArrowButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.UpHot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.UpHot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.UpHot",
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));
}

Remarks
You can use the VisualStyleElement returned by the UpHot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.UpNormal
VisualStyleElement.ScrollBar.ArrowButton.UpNormal
I n this Article
Gets a visual style element that represents an upward-pointing scroll arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UpNormal { get; }


member this.UpNormal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing scroll arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UpNormal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementScrollBarArrowButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.UpNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.UpNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.UpNormal",
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));
}

Remarks
You can use the VisualStyleElement returned by the UpNormal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ArrowButton.UpPressed
VisualStyleElement.ScrollBar.ArrowButton.UpPressed
I n this Article
Gets a visual style element that represents an upward-pointing scroll arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement UpPressed { get; }


member this.UpPressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing scroll arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the UpPressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementArrowButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarArrowButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ArrowButton.UpPressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ArrowButton.UpPressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ArrowButton.UpPressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the UpPressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.GripperHorizontal Visual
StyleElement.ScrollBar.GripperHorizontal Class
Provides a VisualStyleElement for the grip of a horizontal scroll box (also known as the thumb). This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.GripperHorizontal
type VisualStyleElement.ScrollBar.GripperHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ScrollBar.GripperHorizontal class returns a VisualStyleElement that
represents the grip of a horizontal scroll box.

Properties
Normal
Normal

Gets a visual style element that represents a grip for a horizontal scroll box.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.GripperHorizontal.Normal
VisualStyleElement.ScrollBar.GripperHorizontal.Normal
I n this Article
Gets a visual style element that represents a grip for a horizontal scroll box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a grip for a horizontal scroll box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarGripperHorizontal1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarGripperHorizontal1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.GripperHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.GripperHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.GripperHorizontal.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.GripperVertical VisualStyle
Element.ScrollBar.GripperVertical Class
Provides a VisualStyleElement for the grip of a vertical scroll box (also known as the thumb). This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.GripperVertical
type VisualStyleElement.ScrollBar.GripperVertical = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ScrollBar.GripperVertical class returns a VisualStyleElement that
represents the grip of a vertical scroll box.

Properties
Normal
Normal

Gets a visual style element that represents a grip for a vertical scroll box.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.GripperVertical.Normal
VisualStyleElement.ScrollBar.GripperVertical.Normal
I n this Article
Gets a visual style element that represents a grip for a vertical scroll box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a grip for a vertical scroll box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarGripperVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarGripperVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.GripperVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.GripperVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.GripperVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LeftTrackHorizontal Visual
StyleElement.ScrollBar.LeftTrackHorizontal Class
Provides VisualStyleElement objects for each state of the left part of a horizontal scroll bar track. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.LeftTrackHorizontal
type VisualStyleElement.ScrollBar.LeftTrackHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.LeftTrackHorizontal class returns a VisualStyleElement for a
different state of the horizontal scroll bar track to the left of the scroll box (also known as the thumb).

Properties
Disabled
Disabled

Gets a visual style element that represents the left part of a horizontal scroll bar track in the disabled state.

Hot
Hot

Gets a visual style element that represents the left part of a horizontal scroll bar track in the hot state.

Normal
Normal

Gets a visual style element that represents the left part of a horizontal scroll bar track in the normal state.

Pressed
Pressed

Gets a visual style element that represents the left part of a horizontal scroll bar track in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled
I n this Article
Gets a visual style element that represents the left part of a horizontal scroll bar track in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left part of a horizontal scroll bar track in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLeftTrackHorizontal4 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLeftTrackHorizontal4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Hot
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Hot
I n this Article
Gets a visual style element that represents the left part of a horizontal scroll bar track in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left part of a horizontal scroll bar track in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLeftTrackHorizontal2 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLeftTrackHorizontal2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LeftTrackHorizontal.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LeftTrackHorizontal.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Normal
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Normal
I n this Article
Gets a visual style element that represents the left part of a horizontal scroll bar track in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left part of a horizontal scroll bar track in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLeftTrackHorizontal1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLeftTrackHorizontal1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LeftTrackHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LeftTrackHorizontal.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Pressed
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Pressed
I n this Article
Gets a visual style element that represents the left part of a horizontal scroll bar track in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left part of a horizontal scroll bar track in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLeftTrackHorizonta13 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLeftTrackHorizontal3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LeftTrackHorizontal.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LeftTrackHorizontal.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LeftTrackHorizontal.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LowerTrackVertical Visual
StyleElement.ScrollBar.LowerTrackVertical Class
Provides VisualStyleElement objects for each state of the lower part of a vertical scroll bar track. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.LowerTrackVertical
type VisualStyleElement.ScrollBar.LowerTrackVertical = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.LowerTrackVertical class returns a VisualStyleElement for a different
state of the vertical scroll bar track below the scroll box (also known as the thumb).

Properties
Disabled
Disabled

Gets a visual style element that represents the lower part of a vertical scroll bar track in the disabled state.

Hot
Hot

Gets a visual style element that represents the lower part of a vertical scroll bar track in the hot state.

Normal
Normal

Gets a visual style element that represents the lower part of a vertical scroll bar track in the normal state.

Pressed
Pressed

Gets a visual style element that represents the lower part of a vertical scroll bar track in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled
VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled
I n this Article
Gets a visual style element that represents the lower part of a vertical scroll bar track in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the lower part of a vertical scroll bar track in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLowerTrackVertical4 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLowerTrackVertical4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LowerTrackVertical.Hot
VisualStyleElement.ScrollBar.LowerTrackVertical.Hot
I n this Article
Gets a visual style element that represents the lower part of a vertical scroll bar track in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the lower part of a vertical scroll bar track in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLowerTrackVertical2 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLowerTrackVertical2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LowerTrackVertical.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LowerTrackVertical.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LowerTrackVertical.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LowerTrackVertical.Normal
VisualStyleElement.ScrollBar.LowerTrackVertical.Normal
I n this Article
Gets a visual style element that represents the lower part of a vertical scroll bar track in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the lower part of a vertical scroll bar track in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLowerTrackVertical1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLowerTrackVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LowerTrackVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LowerTrackVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LowerTrackVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.LowerTrackVertical.Pressed
VisualStyleElement.ScrollBar.LowerTrackVertical.Pressed
I n this Article
Gets a visual style element that represents the lower part of a vertical scroll bar track in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the lower part of a vertical scroll bar track in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarLowerTrackVertical3 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarLowerTrackVertical3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.LowerTrackVertical.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.LowerTrackVertical.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.LowerTrackVertical.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.RightTrackHorizontal Visual
StyleElement.ScrollBar.RightTrackHorizontal Class
Provides VisualStyleElement objects for each state of the right part of a horizontal scroll bar track. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.RightTrackHorizontal
type VisualStyleElement.ScrollBar.RightTrackHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.RightTrackHorizontal class returns a VisualStyleElement for a
different state of the horizontal scroll bar track to the right of the scroll box (also known as the thumb).

Properties
Disabled
Disabled

Gets a visual style element that represents the right part of a horizontal scroll bar track in the disabled state.

Hot
Hot

Gets a visual style element that represents the right part of a horizontal scroll bar track in the hot state.

Normal
Normal

Gets a visual style element that represents the right part of a horizontal scroll bar track in the normal state.

Pressed
Pressed

Gets a visual style element that represents the right part of a horizontal scroll bar track in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.RightTrackHorizontal.
Disabled VisualStyleElement.ScrollBar.RightTrack
Horizontal.Disabled
I n this Article
Gets a visual style element that represents the right part of a horizontal scroll bar track in the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right part of a horizontal scroll bar track in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarRightTrackHorizontal4 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarRightTrackHorizontal4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.RightTrackHorizontal.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.RightTrackHorizontal.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.RightTrackHorizontal.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.RightTrackHorizontal.Hot
VisualStyleElement.ScrollBar.RightTrackHorizontal.Hot
I n this Article
Gets a visual style element that represents the right part of a horizontal scroll bar track in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right part of a horizontal scroll bar track in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarRightTrackHorizontal2 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarRightTrackHorizontal2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.RightTrackHorizontal.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.RightTrackHorizontal.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.RightTrackHorizontal.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.RightTrackHorizontal.
Normal VisualStyleElement.ScrollBar.RightTrack
Horizontal.Normal
I n this Article
Gets a visual style element that represents the right part of a horizontal scroll bar track in the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right part of a horizontal scroll bar track in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarRightTrackHorizontal1 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarRightTrackHorizontal1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.RightTrackHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.RightTrackHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.RightTrackHorizontal.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.RightTrackHorizontal.
Pressed VisualStyleElement.ScrollBar.RightTrack
Horizontal.Pressed
I n this Article
Gets a visual style element that represents the right part of a horizontal scroll bar track in the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right part of a horizontal scroll bar track in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarRightTrackHorizontal3 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarRightTrackHorizontal3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.RightTrackHorizontal.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.RightTrackHorizontal.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.RightTrackHorizontal.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.SizeBox VisualStyleElement.
ScrollBar.SizeBox Class
Provides VisualStyleElement objects for each state of the sizing handle of a scroll bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.SizeBox
type VisualStyleElement.ScrollBar.SizeBox = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.SizeBox class returns a VisualStyleElement for the sizing handle of a
scroll bar.

Properties
LeftAlign
LeftAlign

Gets a visual style element that represents a sizing handle that is aligned to the left.

RightAlign
RightAlign

Gets a visual style element that represents a sizing handle that is aligned to the right.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.SizeBox.LeftAlign VisualStyle
Element.ScrollBar.SizeBox.LeftAlign
I n this Article
Gets a visual style element that represents a sizing handle that is aligned to the left.

public static System.Windows.Forms.VisualStyles.VisualStyleElement LeftAlign { get; }


member this.LeftAlign : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a sizing handle that is aligned to the left.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the LeftAlign property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarSizeBox2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarSizeBox2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.SizeBox.LeftAlign))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.SizeBox.LeftAlign);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.SizeBox.LeftAlign",
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));
}

Remarks
You can use the VisualStyleElement returned by the LeftAlign property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.SizeBox.RightAlign Visual
StyleElement.ScrollBar.SizeBox.RightAlign
I n this Article
Gets a visual style element that represents a sizing handle that is aligned to the right.

public static System.Windows.Forms.VisualStyles.VisualStyleElement RightAlign { get; }


member this.RightAlign : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a sizing handle that is aligned to the right.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the RightAlign property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementScrollBarSizeBox1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementScrollBarSizeBox1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.SizeBox.RightAlign))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.SizeBox.RightAlign);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.SizeBox.RightAlign",
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));
}

Remarks
You can use the VisualStyleElement returned by the RightAlign property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonHorizontal
VisualStyleElement.ScrollBar.ThumbButtonHorizontal
Class
Provides VisualStyleElement objects for each state of a horizontal scroll box (also known as the thumb). This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.ThumbButtonHorizontal
type VisualStyleElement.ScrollBar.ThumbButtonHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.ThumbButtonHorizontal class returns a VisualStyleElement for a
different state of a horizontal scroll box.

Properties
Disabled
Disabled

Gets a visual style element that represents a horizontal scroll box in the disabled state.

Hot
Hot

Gets a visual style element that represents a horizontal scroll box in the hot state.

Normal
Normal

Gets a visual style element that represents a horizontal scroll box in the normal state.

Pressed
Pressed

Gets a visual style element that represents a horizontal scroll box in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.
Disabled VisualStyleElement.ScrollBar.ThumbButton
Horizontal.Disabled
I n this Article
Gets a visual style element that represents a horizontal scroll box in the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonHorizontal4 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarThumbButtonHorizontal4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Hot
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Hot
I n this Article
Gets a visual style element that represents a horizontal scroll box in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonHorizontal2 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarThumbButtonHorizontal2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.
Normal VisualStyleElement.ScrollBar.ThumbButton
Horizontal.Normal
I n this Article
Gets a visual style element that represents a horizontal scroll box in the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonHorizontal1 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarThumbButtonHorizontal1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonHorizontal.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.
Pressed VisualStyleElement.ScrollBar.ThumbButton
Horizontal.Pressed
I n this Article
Gets a visual style element that represents a horizontal scroll box in the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonHorizontal3 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementScrollBarThumbButtonHorizontal3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonVertical Visual
StyleElement.ScrollBar.ThumbButtonVertical Class
Provides VisualStyleElement objects for each state of a vertical scroll box (also known as the thumb). This class cannot
be inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.ThumbButtonVertical
type VisualStyleElement.ScrollBar.ThumbButtonVertical = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.ThumbButtonVertical class returns a VisualStyleElement for a
different state of a vertical scroll box.

Properties
Disabled
Disabled

Gets a visual style element that represents a vertical scroll box in the disabled state.

Hot
Hot

Gets a visual style element that represents a vertical scroll box in the hot state.

Normal
Normal

Gets a visual style element that represents a vertical scroll box in the normal state.

Pressed
Pressed

Gets a visual style element that represents a vertical scroll box in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.ThumbButtonVertical.
Disabled VisualStyleElement.ScrollBar.ThumbButton
Vertical.Disabled
I n this Article
Gets a visual style element that represents a vertical scroll box in the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonVertical4 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarThumbButtonVertical4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonVertical.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonVertical.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonVertical.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonVertical.Hot
VisualStyleElement.ScrollBar.ThumbButtonVertical.Hot
I n this Article
Gets a visual style element that represents a vertical scroll box in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonVertical2 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarThumbButtonVertical2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonVertical.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonVertical.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonVertical.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonVertical.
Normal VisualStyleElement.ScrollBar.ThumbButton
Vertical.Normal
I n this Article
Gets a visual style element that represents a vertical scroll box in the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonVertical1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarThumbButtonVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.ThumbButtonVertical.
Pressed VisualStyleElement.ScrollBar.ThumbButton
Vertical.Pressed
I n this Article
Gets a visual style element that represents a vertical scroll box in the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarThumbButtonVertical3 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarThumbButtonVertical3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.ThumbButtonVertical.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonVertical.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonVertical.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.UpperTrackVertical Visual
StyleElement.ScrollBar.UpperTrackVertical Class
Provides VisualStyleElement objects for each state of the upper part of a vertical scroll bar track. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.ScrollBar.UpperTrackVertical
type VisualStyleElement.ScrollBar.UpperTrackVertical = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ScrollBar.UpperTrackVertical class returns a VisualStyleElement for a different
state of the vertical scroll bar track above the scroll box (also known as the thumb).

Properties
Disabled
Disabled

Gets a visual style element that represents the upper part of a vertical scroll bar track in the disabled state.

Hot
Hot

Gets a visual style element that represents the upper part of a vertical scroll bar track in the hot state.

Normal
Normal

Gets a visual style element that represents the upper part of a vertical scroll bar track in the normal state.

Pressed
Pressed

Gets a visual style element that represents the upper part of a vertical scroll bar track in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled
VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled
I n this Article
Gets a visual style element that represents the upper part of a vertical scroll bar track in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the upper part of a vertical scroll bar track in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarUpperTrackVertical4 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarUpperTrackVertical4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.UpperTrackVertical.Hot
VisualStyleElement.ScrollBar.UpperTrackVertical.Hot
I n this Article
Gets a visual style element that represents the upper part of a vertical scroll bar track in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the upper part of a vertical scroll bar track in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarUpperTrackVertical2 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarUpperTrackVertical2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.UpperTrackVertical.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.UpperTrackVertical.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.UpperTrackVertical.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.UpperTrackVertical.Normal
VisualStyleElement.ScrollBar.UpperTrackVertical.Normal
I n this Article
Gets a visual style element that represents the upper part of a vertical scroll bar track in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the upper part of a vertical scroll bar track in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarUpperTrackVertical1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarUpperTrackVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.UpperTrackVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.UpperTrackVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.UpperTrackVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ScrollBar.UpperTrackVertical.Pressed
VisualStyleElement.ScrollBar.UpperTrackVertical.Pressed
I n this Article
Gets a visual style element that represents the upper part of a vertical scroll bar track in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the upper part of a vertical scroll bar track in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementScrollBarUpperTrackVertical3 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementScrollBarUpperTrackVertical3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ScrollBar.UpperTrackVertical.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ScrollBar.UpperTrackVertical.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ScrollBar.UpperTrackVertical.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Spin VisualStyleElement.Spin Class
Contains classes that provide VisualStyleElement objects for the arrows of a spin button control (also known as an up-
down control). This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Spin
type VisualStyleElement.Spin = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Spin class provides a foundation in which the following classes are defined:
VisualStyleElement.Spin.Down
VisualStyleElement.Spin.DownHorizontal
VisualStyleElement.Spin.Up
VisualStyleElement.Spin.UpHorizontal
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the spin
button arrow specified by the class name.
VisualStyleElement.Spin.Down VisualStyleElement.Spin.
Down Class
Provides VisualStyleElement objects for each state of the downward-pointing arrow for a spin button control (also
known as an up-down control). This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Spin.Down
type VisualStyleElement.Spin.Down = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Spin.Down class returns a VisualStyleElement for a different state of the
downward-pointing arrow for a spin button.

Properties
Disabled
Disabled

Gets a visual style element that represents a downward-pointing spin button arrow in the disabled state.

Hot
Hot

Gets a visual style element that represents a downward-pointing spin button arrow in the hot state.

Normal
Normal

Gets a visual style element that represents a downward-pointing spin button arrow in the normal state.

Pressed
Pressed

Gets a visual style element that represents a downward-pointing spin button arrow in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Spin.Down.Disabled VisualStyle
Element.Spin.Down.Disabled
I n this Article
Gets a visual style element that represents a downward-pointing spin button arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing spin button arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Down4 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Down4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Down.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Down.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Down.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Spin.Down.Hot VisualStyleElement.
Spin.Down.Hot
I n this Article
Gets a visual style element that represents a downward-pointing spin button arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing spin button arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Down2 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Down2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Down.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Down.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Down.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Spin.Down.Normal VisualStyle
Element.Spin.Down.Normal
I n this Article
Gets a visual style element that represents a downward-pointing spin button arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing spin button arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Down1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Down1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Down.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Down.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Down.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Spin.Down.Pressed VisualStyle
Element.Spin.Down.Pressed
I n this Article
Gets a visual style element that represents a downward-pointing spin button arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing spin button arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Down3 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Down3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Down.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Down.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Down.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Spin.DownHorizontal VisualStyle
Element.Spin.DownHorizontal Class
Provides VisualStyleElement objects for each state of the left-pointing arrow for a spin button control (also known as
an up-down control). This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Spin.DownHorizontal
type VisualStyleElement.Spin.DownHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Spin.DownHorizontal class returns a VisualStyleElement for a different state
of the left-pointing arrow for a spin button.

Properties
Disabled
Disabled

Gets a visual style element that represents a left-pointing spin button arrow in the disabled state.

Hot
Hot

Gets a visual style element that represents a left-pointing spin button arrow in the hot state.

Normal
Normal

Gets a visual style element that represents a left-pointing spin button arrow in the normal state.

Pressed
Pressed

Gets a visual style element that represents a left-pointing spin button arrow in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Spin.DownHorizontal.Disabled Visual
StyleElement.Spin.DownHorizontal.Disabled
I n this Article
Gets a visual style element that represents a left-pointing spin button arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing spin button arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Spin_DownHorizontal4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.DownHorizontal.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.DownHorizontal.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.DownHorizontal.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Spin.DownHorizontal.Hot VisualStyle
Element.Spin.DownHorizontal.Hot
I n this Article
Gets a visual style element that represents a left-pointing spin button arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing spin button arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Spin_DownHorizontal2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.DownHorizontal.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.DownHorizontal.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.DownHorizontal.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Spin.DownHorizontal.Normal Visual
StyleElement.Spin.DownHorizontal.Normal
I n this Article
Gets a visual style element that represents a left-pointing spin button arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing spin button arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_DownHorizontal1 method from the Paint event-handling method, passing e as
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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Spin.DownHorizontal.Pressed Visual
StyleElement.Spin.DownHorizontal.Pressed
I n this Article
Gets a visual style element that represents a left-pointing spin button arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing spin button arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Spin_DownHorizontal3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.DownHorizontal.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.DownHorizontal.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.DownHorizontal.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Spin.Up VisualStyleElement.Spin.Up
Class
Provides VisualStyleElement objects for each state of the upward-pointing arrow for a spin button control (also known
as an up-down control). This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Spin.Up
type VisualStyleElement.Spin.Up = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Spin.Up class returns a VisualStyleElement for a different state of the upward-
pointing arrow for a spin button.

Properties
Disabled
Disabled

Gets a visual style element that represents an upward-pointing spin button arrow in the disabled state.

Hot
Hot

Gets a visual style element that represents an upward-pointing spin button arrow in the hot state.

Normal
Normal

Gets a visual style element that represents an upward-pointing spin button arrow in the normal state.

Pressed
Pressed

Gets a visual style element that represents an upward-pointing spin button arrow in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Spin.Up.Disabled VisualStyleElement.
Spin.Up.Disabled
I n this Article
Gets a visual style element that represents an upward-pointing spin button arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing spin button arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Up4 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Up4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Up.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Up.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Up.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Spin.Up.Hot VisualStyleElement.Spin.
Up.Hot
I n this Article
Gets a visual style element that represents an upward-pointing spin button arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing spin button arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Up2 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Up2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Up.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Up.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Up.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Spin.Up.Normal VisualStyleElement.
Spin.Up.Normal
I n this Article
Gets a visual style element that represents an upward-pointing spin button arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing spin button arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Up1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Up1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Up.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Up.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Up.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Spin.Up.Pressed VisualStyleElement.
Spin.Up.Pressed
I n this Article
Gets a visual style element that represents an upward-pointing spin button arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing spin button arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_Up3 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElement_Spin_Up3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Up.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Up.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.Up.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Spin.UpHorizontal VisualStyle
Element.Spin.UpHorizontal Class
Provides VisualStyleElement objects for each state of the right-pointing arrow for a spin button control (also known as
an up-down control). This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Spin.UpHorizontal
type VisualStyleElement.Spin.UpHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Spin.UpHorizontal class gets a VisualStyleElement for a different state of the
right-pointing arrow for a spin button.

Properties
Disabled
Disabled

Gets a visual style element that represents a right-pointing spin button arrow in the disabled state.

Hot
Hot

Gets a visual style element that represents a right-pointing spin button arrow in the hot state.

Normal
Normal

Gets a visual style element that represents a right-pointing spin button arrow in the normal state.

Pressed
Pressed

Gets a visual style element that represents a right-pointing spin button arrow in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Spin.UpHorizontal.Disabled Visual
StyleElement.Spin.UpHorizontal.Disabled
I n this Article
Gets a visual style element that represents a right-pointing spin button arrow in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing spin button arrow in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Spin_UpHorizontal4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.UpHorizontal.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.UpHorizontal.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.UpHorizontal.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Spin.UpHorizontal.Hot VisualStyle
Element.Spin.UpHorizontal.Hot
I n this Article
Gets a visual style element that represents a right-pointing spin button arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing spin button arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Spin_UpHorizontal2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.UpHorizontal.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.UpHorizontal.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.UpHorizontal.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Spin.UpHorizontal.Normal Visual
StyleElement.Spin.UpHorizontal.Normal
I n this Article
Gets a visual style element that represents a right-pointing spin button arrow in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing spin button arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Spin_UpHorizontal1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Spin_UpHorizontal1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.UpHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.UpHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.UpHorizontal.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Spin.UpHorizontal.Pressed Visual
StyleElement.Spin.UpHorizontal.Pressed
I n this Article
Gets a visual style element that represents a right-pointing spin button arrow in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing spin button arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Spin_UpHorizontal3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.UpHorizontal.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.UpHorizontal.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.UpHorizontal.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel VisualStyleElement.Start
Panel Class
Contains classes that provide VisualStyleElement objects for the parts of the Start menu. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.StartPanel
type VisualStyleElement.StartPanel = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.StartPanel class provides a foundation in which the following classes are defined:
VisualStyleElement.StartPanel.LogOff
VisualStyleElement.StartPanel.LogOffButtons
VisualStyleElement.StartPanel.MorePrograms
VisualStyleElement.StartPanel.MoreProgramsArrow
VisualStyleElement.StartPanel.PlaceList
VisualStyleElement.StartPanel.PlaceListSeparator
VisualStyleElement.StartPanel.Preview
VisualStyleElement.StartPanel.ProgList
VisualStyleElement.StartPanel.ProgListSeparator
VisualStyleElement.StartPanel.UserPane
VisualStyleElement.StartPanel.UserPicture
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the Start
menu part specified by the class name.
VisualStyleElement.StartPanel.LogOff VisualStyle
Element.StartPanel.LogOff Class
Provides a VisualStyleElement for the bottom border of the Start menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.LogOff
type VisualStyleElement.StartPanel.LogOff = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.LogOff class returns a VisualStyleElement that represents
the bottom border of the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the bottom border of the Start menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.LogOff.Normal VisualStyle
Element.StartPanel.LogOff.Normal
I n this Article
Gets a visual style element that represents the bottom border of the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the bottom border of the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelLogOff1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelLogOff1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.LogOff.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.LogOff.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.LogOff.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.LogOffButtons VisualStyle
Element.StartPanel.LogOffButtons Class
Provides VisualStyleElement objects for each state of the Log Off and Shut Down buttons in the Start menu. This
class cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.LogOffButtons
type VisualStyleElement.StartPanel.LogOffButtons = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.StartPanel.LogOffButtons class returns a VisualStyleElement for a different
state of the Log Off and Shut Down buttons.

Properties
Hot
Hot

Gets a visual style element that represents the Log Off and Shut Down buttons in the hot state.

Normal
Normal

Gets a visual style element that represents the Log Off and Shut Down buttons in the normal state.

Pressed
Pressed

Gets a visual style element that represents the Log Off and Shut Down buttons in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.LogOffButtons.Hot Visual
StyleElement.StartPanel.LogOffButtons.Hot
I n this Article
Gets a visual style element that represents the Log Off and Shut Down buttons in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Log Off and Shut Down buttons in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelLogOffButtons2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelLogOffButtons2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.LogOffButtons.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.LogOffButtons.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.LogOffButtons.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.LogOffButtons.Normal
VisualStyleElement.StartPanel.LogOffButtons.Normal
I n this Article
Gets a visual style element that represents the Log Off and Shut Down buttons in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Log Off and Shut Down buttons in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelLogOffButtons1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelLogOffButtons1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.LogOffButtons.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.LogOffButtons.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.LogOffButtons.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.LogOffButtons.Pressed
VisualStyleElement.StartPanel.LogOffButtons.Pressed
I n this Article
Gets a visual style element that represents the Log Off and Shut Down buttons in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Log Off and Shut Down buttons in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelLogOffButtons3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelLogOffButtons3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.LogOffButtons.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.LogOffButtons.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.LogOffButtons.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.MorePrograms VisualStyle
Element.StartPanel.MorePrograms Class
Provides a VisualStyleElement for the background of the All Programs item in the Start menu. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.StartPanel.MorePrograms
type VisualStyleElement.StartPanel.MorePrograms = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.MorePrograms class returns a VisualStyleElement that
represents the background of the All Programs menu item.

Properties
Normal
Normal

Gets a visual style element that represents the background of the All Programs menu item.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.MorePrograms.Normal
VisualStyleElement.StartPanel.MorePrograms.Normal
I n this Article
Gets a visual style element that represents the background of the All Programs menu item.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the All Programs menu item.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelMorePrograms1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelMorePrograms1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.MorePrograms.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.MorePrograms.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.MorePrograms.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.MoreProgramsArrow
VisualStyleElement.StartPanel.MoreProgramsArrow Class
Provides VisualStyleElement objects for each state of the All Programs arrow in the Start menu. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.StartPanel.MoreProgramsArrow
type VisualStyleElement.StartPanel.MoreProgramsArrow = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.StartPanel.MoreProgramsArrow class returns a VisualStyleElement for a
different state of the All Programs arrow.

Properties
Hot
Hot

Gets a visual style element that represents the All Programs arrow in the hot state.

Normal
Normal

Gets a visual style element that represents the All Programs arrow in the normal state.

Pressed
Pressed

Gets a visual style element that represents the All Programs arrow in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.MoreProgramsArrow.Hot
VisualStyleElement.StartPanel.MoreProgramsArrow.Hot
I n this Article
Gets a visual style element that represents the All Programs arrow in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the All Programs arrow in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelMoreProgramsArrow2 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementStartPanelMoreProgramsArrow2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.MoreProgramsArrow.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.MoreProgramsArrow.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.MoreProgramsArrow.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.MoreProgramsArrow.
Normal VisualStyleElement.StartPanel.MorePrograms
Arrow.Normal
I n this Article
Gets a visual style element that represents the All Programs arrow in the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the All Programs arrow in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelMoreProgramsArrow1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementStartPanelMoreProgramsArrow1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.MoreProgramsArrow.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.MoreProgramsArrow.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.MoreProgramsArrow.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.MoreProgramsArrow.
Pressed VisualStyleElement.StartPanel.MorePrograms
Arrow.Pressed
I n this Article
Gets a visual style element that represents the All Programs arrow in the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the All Programs arrow in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelMoreProgramsArrow3 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementStartPanelMoreProgramsArrow3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.MoreProgramsArrow.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.MoreProgramsArrow.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.MoreProgramsArrow.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.PlaceList VisualStyle
Element.StartPanel.PlaceList Class
Provides a VisualStyleElement for the background of the right side of the Start menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.PlaceList
type VisualStyleElement.StartPanel.PlaceList = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.PlaceList class returns a VisualStyleElement that represents
the background of the right side of the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the background of the right side of the Start menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.PlaceList.Normal Visual
StyleElement.StartPanel.PlaceList.Normal
I n this Article
Gets a visual style element that represents the background of the right side of the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the right side of the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelPlaceList1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelPlaceList1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.PlaceList.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.PlaceList.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.PlaceList.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.PlaceListSeparator Visual
StyleElement.StartPanel.PlaceListSeparator Class
Provides a VisualStyleElement for the bar that separates groups of items in the right side of the Start menu. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.PlaceListSeparator
type VisualStyleElement.StartPanel.PlaceListSeparator = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.PlaceListSeparator class returns a VisualStyleElement that
represents the bar that separates groups of items in the right side of the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the bar that separates groups of items in the right side of the Start
menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.PlaceListSeparator.Normal
VisualStyleElement.StartPanel.PlaceListSeparator.Normal
I n this Article
Gets a visual style element that represents the bar that separates groups of items in the right side of the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the bar that separates groups of items in the right side of the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelPlaceListSeparator1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementStartPanelPlaceListSeparator1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.PlaceListSeparator.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.PlaceListSeparator.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.PlaceListSeparator.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.Preview VisualStyle
Element.StartPanel.Preview Class
Provides a VisualStyleElement for the preview area of the Start menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.Preview
type VisualStyleElement.StartPanel.Preview = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.Preview class returns a VisualStyleElement that represents
the preview area of the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the preview area of the Start menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.Preview.Normal Visual
StyleElement.StartPanel.Preview.Normal
I n this Article
Gets a visual style element that represents the preview area of the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the preview area of the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelPreview1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelPreview1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.Preview.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.Preview.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.Preview.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.ProgList VisualStyle
Element.StartPanel.ProgList Class
Provides a VisualStyleElement for the background of the left side of the Start menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.ProgList
type VisualStyleElement.StartPanel.ProgList = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.ProgList class returns a VisualStyleElement that represents
the background of the left side of the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the background of the left side of the Start menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.ProgList.Normal Visual
StyleElement.StartPanel.ProgList.Normal
I n this Article
Gets a visual style element that represents the background of the left side of the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the left side of the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelProgList1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelProgList1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.ProgList.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.ProgList.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.ProgList.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.ProgListSeparator Visual
StyleElement.StartPanel.ProgListSeparator Class
Provides a VisualStyleElement for the bar that separates groups of items in the left side of the Start menu. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.ProgListSeparator
type VisualStyleElement.StartPanel.ProgListSeparator = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.ProgListSeparator class returns a VisualStyleElement that
represents the bar that separates groups of items in the left side of the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the bar that separates groups of items in the left side of the Start menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.ProgListSeparator.Normal
VisualStyleElement.StartPanel.ProgListSeparator.Normal
I n this Article
Gets a visual style element that represents the bar that separates groups of items in the left side of the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the bar that separates groups of items in the left side of the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelProgListSeparator1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementStartPanelProgListSeparator1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.ProgListSeparator.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.ProgListSeparator.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.ProgListSeparator.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.StartPanel.UserPane VisualStyle
Element.StartPanel.UserPane Class
Provides a VisualStyleElement for the top border of the Start menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.UserPane
type VisualStyleElement.StartPanel.UserPane = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.UserPane class returns a VisualStyleElement that represents
the top border of the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the top border of the Start menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.UserPane.Normal Visual
StyleElement.StartPanel.UserPane.Normal
I n this Article
Gets a visual style element that represents the top border of the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the top border of the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelUserPane1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelUserPane1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.UserPane.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.UserPane.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.UserPane.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));
}
VisualStyleElement.StartPanel.UserPicture VisualStyle
Element.StartPanel.UserPicture Class
Provides a VisualStyleElement for the background of the user picture on the Start menu. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.StartPanel.UserPicture
type VisualStyleElement.StartPanel.UserPicture = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.StartPanel.UserPicture class returns a VisualStyleElement that
represents the background of the user picture on the Start menu.

Properties
Normal
Normal

Gets a visual style element that represents the background of the user picture on the Start menu.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.StartPanel.UserPicture.Normal Visual
StyleElement.StartPanel.UserPicture.Normal
I n this Article
Gets a visual style element that represents the background of the user picture on the Start menu.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the user picture on the Start menu.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStartPanelUserPicture1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStartPanelUserPicture1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.StartPanel.UserPicture.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.StartPanel.UserPicture.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.StartPanel.UserPicture.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));
}
VisualStyleElement.Status VisualStyleElement.Status
Class
Contains classes that provide VisualStyleElement objects for the parts of the status bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Status
type VisualStyleElement.Status = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Status class provides a foundation in which the following classes are defined:
VisualStyleElement.Status.Bar
VisualStyleElement.Status.Gripper
VisualStyleElement.Status.GripperPane
VisualStyleElement.Status.Pane
Each of these classes provides a property that returns a VisualStyleElement for the status bar part specified by the class
name.
VisualStyleElement.Status.Bar VisualStyleElement.Status.
Bar Class
Provides a VisualStyleElement for the background of the status bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Status.Bar
type VisualStyleElement.Status.Bar = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Status.Bar class returns a VisualStyleElement that represents the
background of the status bar.

Properties
Normal
Normal

Gets a visual style element that represents the background of the status bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Status.Bar.Normal VisualStyleElement.
Status.Bar.Normal
I n this Article
Gets a visual style element that represents the background of the status bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the status bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStatusBar1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementStatusBar1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Status.Bar.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Status.Bar.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Status.Bar.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Status.Gripper VisualStyleElement.
Status.Gripper Class
Provides a VisualStyleElement for the grip of the status bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Status.Gripper
type VisualStyleElement.Status.Gripper = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Status.Gripper class returns a VisualStyleElement that represents the
status bar grip.

Properties
Normal
Normal

Gets a visual style element that represents the status bar grip.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Status.Gripper.Normal VisualStyle
Element.Status.Gripper.Normal
I n this Article
Gets a visual style element that represents the status bar grip.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the status bar grip.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStatusGripper1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStatusGripper1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Status.Gripper.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Status.Gripper.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Status.Gripper.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Status.GripperPane VisualStyle
Element.Status.GripperPane Class
Provides a VisualStyleElement for the pane of the grip in the status bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Status.GripperPane
type VisualStyleElement.Status.GripperPane = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Status.GripperPane class returns a VisualStyleElement that represents
the pane for the status bar grip.

Properties
Normal
Normal

Gets a visual style element that represents a pane for the status bar grip.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Status.GripperPane.Normal Visual
StyleElement.Status.GripperPane.Normal
I n this Article
Gets a visual style element that represents a pane for the status bar grip.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pane for the status bar grip.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStatusGripperPane1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementStatusGripperPane1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Status.GripperPane.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Status.GripperPane.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Status.GripperPane.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Status.Pane VisualStyleElement.
Status.Pane Class
Provides a VisualStyleElement for a status bar pane. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Status.Pane
type VisualStyleElement.Status.Pane = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Status.Pane class returns a VisualStyleElement that represents a pane
in the status bar.

Properties
Normal
Normal

Gets a visual style element that represents a status bar pane.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Status.Pane.Normal VisualStyle
Element.Status.Pane.Normal
I n this Article
Gets a visual style element that represents a status bar pane.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a status bar pane.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementStatusPane1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementStatusPane1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Status.Pane.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Status.Pane.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Status.Pane.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab VisualStyleElement.Tab Class
Contains classes that provide VisualStyleElement objects for the parts of a tab control. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab
type VisualStyleElement.Tab = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Tab class provides a foundation in which the following classes are defined:
VisualStyleElement.Tab.Body
VisualStyleElement.Tab.Pane
VisualStyleElement.Tab.TabItem
VisualStyleElement.Tab.TabItemBothEdges
VisualStyleElement.Tab.TabItemLeftEdge
VisualStyleElement.Tab.TabItemRightEdge
VisualStyleElement.Tab.TopTabItem
VisualStyleElement.Tab.TopTabItemBothEdges
VisualStyleElement.Tab.TopTabItemLeftEdge
VisualStyleElement.Tab.TopTabItemRightEdge
Each of these classes provides one or more properties that return a VisualStyleElement for the part of the tab control
specified by the class name.
VisualStyleElement.Tab.Body VisualStyleElement.Tab.
Body Class
Provides a VisualStyleElement for the interior of a tab control page. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.Body
type VisualStyleElement.Tab.Body = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Tab.Body class returns a VisualStyleElement that represents the
interior of a tab control page.

Properties
Normal
Normal

Gets a visual style element that represents the interior of a tab control page.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.Body.Normal VisualStyleElement.
Tab.Body.Normal
I n this Article
Gets a visual style element that represents the interior of a tab control page.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the interior of a tab control page.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabBody1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementTabBody1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.Body.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.Body.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.Body.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.Pane VisualStyleElement.Tab.Pane
Class
Provides a VisualStyleElement for the border of a tab control page. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.Pane
type VisualStyleElement.Tab.Pane = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Tab.Pane class returns a VisualStyleElement that represents the border
of a tab control page.

Properties
Normal
Normal

Gets a visual style element that represents the border of a tab control page.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.Pane.Normal VisualStyleElement.
Tab.Pane.Normal
I n this Article
Gets a visual style element that represents the border of a tab control page.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the border of a tab control page.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabPane1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementTabPane1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.Pane.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.Pane.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.Pane.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItem VisualStyleElement.Tab.
TabItem Class
Provides VisualStyleElement objects for each state of a tab control that shares its top, left, and right borders with other
tab controls. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.TabItem
type VisualStyleElement.Tab.TabItem = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Tab.TabItem class returns a VisualStyleElement for a different state of a tab
control that shares its top, left, and right borders with other tab controls.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled tab control that shares its top, left, and right borders with
other tab controls.

Hot
Hot

Gets a visual style element that represents a hot tab control that shares its top, left, and right borders with other
tab controls.

Normal
Normal

Gets a visual style element that represents a normal tab control that shares its top, left, and right borders with
other tab controls.

Pressed
Pressed

Gets a visual style element that represents a pressed tab control that shares its top, left, and right borders with
other tab controls.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TabItem.Disabled VisualStyle
Element.Tab.TabItem.Disabled
I n this Article
Gets a visual style element that represents a disabled tab control that shares its top, left, and right borders with other
tab controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled tab control that shares its top, left, and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTabItem4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItem.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItem.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItem.Hot VisualStyleElement.
Tab.TabItem.Hot
I n this Article
Gets a visual style element that represents a hot tab control that shares its top, left, and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot tab control that shares its top, left, and right borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItem2 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementTabTabItem2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItem.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItem.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItem.Normal VisualStyle
Element.Tab.TabItem.Normal
I n this Article
Gets a visual style element that represents a normal tab control that shares its top, left, and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal tab control that shares its top, left, and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItem1 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementTabTabItem1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItem.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItem.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItem.Pressed VisualStyle
Element.Tab.TabItem.Pressed
I n this Article
Gets a visual style element that represents a pressed tab control that shares its top, left, and right borders with other
tab controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed tab control that shares its top, left, and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItem3 method from the Paint event-handling method, passing e as PaintEventArgs.

public void DrawVisualStyleElementTabTabItem3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItem.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItem.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemBothEdges VisualStyle
Element.Tab.TabItemBothEdges Class
Provides a VisualStyleElement for a tab control that shares its top border with another tab control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Tab.TabItemBothEdges
type VisualStyleElement.Tab.TabItemBothEdges = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Tab.TabItemBothEdges class returns a VisualStyleElement that
represents a tab control that shares its top border with another tab control.

Properties
Normal
Normal

Gets a visual style element that represents a tab control that shares its top border with another tab control.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TabItemBothEdges.Normal Visual
StyleElement.Tab.TabItemBothEdges.Normal
I n this Article
Gets a visual style element that represents a tab control that shares its top border with another tab control.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tab control that shares its top border with another tab control.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemBothEdges1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemBothEdges1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemBothEdges.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemBothEdges.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemBothEdges.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemLeftEdge VisualStyle
Element.Tab.TabItemLeftEdge Class
Provides VisualStyleElement objects for each state of a tab control that shares its top and right borders with other tab
controls. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.TabItemLeftEdge
type VisualStyleElement.Tab.TabItemLeftEdge = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Tab.TabItemLeftEdge class returns a VisualStyleElement for a different state of
a tab control that shares its top and right borders with other tab controls.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled tab control that shares its top and right borders with other
tab controls.

Hot
Hot

Gets a visual style element that represents a hot tab control that shares its top and right borders with other tab
controls.

Normal
Normal

Gets a visual style element that represents a normal tab control that shares its top and right borders with other tab
controls.

Pressed
Pressed

Gets a visual style element that represents a pressed tab control that shares its top and right borders with other
tab controls.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TabItemLeftEdge.Disabled Visual
StyleElement.Tab.TabItemLeftEdge.Disabled
I n this Article
Gets a visual style element that represents a disabled tab control that shares its top and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled tab control that shares its top and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemLeftEdge4 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTabItemLeftEdge4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemLeftEdge.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemLeftEdge.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemLeftEdge.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemLeftEdge.Hot VisualStyle
Element.Tab.TabItemLeftEdge.Hot
I n this Article
Gets a visual style element that represents a hot tab control that shares its top and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot tab control that shares its top and right borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemLeftEdge2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemLeftEdge2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemLeftEdge.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemLeftEdge.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemLeftEdge.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemLeftEdge.Normal Visual
StyleElement.Tab.TabItemLeftEdge.Normal
I n this Article
Gets a visual style element that represents a normal tab control that shares its top and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal tab control that shares its top and right borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemLeftEdge1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemLeftEdge1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemLeftEdge.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemLeftEdge.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemLeftEdge.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemLeftEdge.Pressed Visual
StyleElement.Tab.TabItemLeftEdge.Pressed
I n this Article
Gets a visual style element that represents a pressed tab control that shares its top and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed tab control that shares its top and right borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemLeftEdge3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemLeftEdge3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemLeftEdge.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemLeftEdge.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemLeftEdge.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemRightEdge VisualStyle
Element.Tab.TabItemRightEdge Class
Provides VisualStyleElement objects for each state of a tab control that shares its top and left borders with other tab
controls. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.TabItemRightEdge
type VisualStyleElement.Tab.TabItemRightEdge = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Tab.TabItemRightEdge class gets a VisualStyleElement for a different state of
a tab control that shares its top and left borders with other tab controls.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled tab control that shares its top and left borders with other tab
controls.

Hot
Hot

Gets a visual style element that represents a hot tab control that shares its top and left borders with other tab
controls.

Normal
Normal

Gets a visual style element that represents a normal tab control that shares its top and left borders with other tab
controls.

Pressed
Pressed

Gets a visual style element that represents a pressed tab control that shares its top and left borders with other tab
controls.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TabItemRightEdge.Disabled
VisualStyleElement.Tab.TabItemRightEdge.Disabled
I n this Article
Gets a visual style element that represents a disabled tab control that shares its top and left borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled tab control that shares its top and left borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemRightEdge4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemRightEdge.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemRightEdge.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemRightEdge.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemRightEdge.Hot Visual
StyleElement.Tab.TabItemRightEdge.Hot
I n this Article
Gets a visual style element that represents a hot tab control that shares its top and left borders with other tab controls.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot tab control that shares its top and left borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemRightEdge2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemRightEdge2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemRightEdge.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemRightEdge.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemRightEdge.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemRightEdge.Normal Visual
StyleElement.Tab.TabItemRightEdge.Normal
I n this Article
Gets a visual style element that represents a normal tab control that shares its top and left borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal tab control that shares its top and left borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemRightEdge1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemRightEdge1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemRightEdge.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemRightEdge.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemRightEdge.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TabItemRightEdge.Pressed Visual
StyleElement.Tab.TabItemRightEdge.Pressed
I n this Article
Gets a visual style element that represents a pressed tab control that shares its top and left borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed tab control that shares its top and left borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTabItemRightEdge3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTabItemRightEdge3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TabItemRightEdge.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TabItemRightEdge.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TabItemRightEdge.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItem VisualStyleElement.
Tab.TopTabItem Class
Provides VisualStyleElement objects for each state of a tab control that shares its bottom, left, and right borders with
other tab controls. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.TopTabItem
type VisualStyleElement.Tab.TopTabItem = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Tab.TopTabItem class returns a VisualStyleElement for a different state of a tab
control that shares its bottom, left, and right borders with other tab controls.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled tab control that shares its bottom, left, and right borders with
other tab controls.

Hot
Hot

Gets a visual style element that represents a hot tab control that shares its bottom, left, and right borders with
other tab controls.

Normal
Normal

Gets a visual style element that represents a normal tab control that shares its bottom, left, and right borders with
other tab controls.

Pressed
Pressed

Gets a visual style element that represents a pressed tab control that shares its bottom, left, and right borders with
other tab controls.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TopTabItem.Disabled VisualStyle
Element.Tab.TopTabItem.Disabled
I n this Article
Gets a visual style element that represents a disabled tab control that shares its bottom, left, and right borders with
other tab controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled tab control that shares its bottom, left, and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItem4 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItem4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItem.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItem.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItem.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItem.Hot VisualStyle
Element.Tab.TopTabItem.Hot
I n this Article
Gets a visual style element that represents a hot tab control that shares its bottom, left, and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot tab control that shares its bottom, left, and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItem2 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItem2(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItem.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItem.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItem.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItem.Normal VisualStyle
Element.Tab.TopTabItem.Normal
I n this Article
Gets a visual style element that represents a normal tab control that shares its bottom, left, and right borders with other
tab controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal tab control that shares its bottom, left, and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItem1 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItem1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItem.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItem.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItem.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItem.Pressed VisualStyle
Element.Tab.TopTabItem.Pressed
I n this Article
Gets a visual style element that represents a pressed tab control that shares its bottom, left, and right borders with
other tab controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed tab control that shares its bottom, left, and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItem3 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItem3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItem.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItem.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItem.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemBothEdges VisualStyle
Element.Tab.TopTabItemBothEdges Class
Provides a VisualStyleElement for a tab control that shares its bottom border with another tab control. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.TopTabItemBothEdges
type VisualStyleElement.Tab.TopTabItemBothEdges = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Tab.TopTabItemBothEdges class returns a VisualStyleElement that
represents a tab control that shares its bottom border with another tab control.

Properties
Normal
Normal

Gets a visual style element that represents a tab control that shares its bottom border with another tab control.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TopTabItemBothEdges.Normal
VisualStyleElement.Tab.TopTabItemBothEdges.Normal
I n this Article
Gets a visual style element that represents a tab control that shares its bottom border with another tab control.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tab control that shares its bottom border with another tab control.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemBothEdges1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTopTabItemBothEdges1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemBothEdges.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemBothEdges.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemBothEdges.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemLeftEdge VisualStyle
Element.Tab.TopTabItemLeftEdge Class
Provides VisualStyleElement objects for each state of a tab control that shares its bottom and right borders with other
tab controls. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.TopTabItemLeftEdge
type VisualStyleElement.Tab.TopTabItemLeftEdge = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Tab.TopTabItemLeftEdge class returns a VisualStyleElement for a different
state of a tab control that shares its bottom and right borders with other tab controls.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled tab control that shares its bottom and right borders with
other tab controls.

Hot
Hot

Gets a visual style element that represents a hot tab control that shares its bottom and right borders with other tab
controls.

Normal
Normal

Gets a visual style element that represents a normal tab control that shares its bottom and right borders with other
tab controls.

Pressed
Pressed

Gets a visual style element that represents a pressed tab control that shares its bottom and right borders with
other tab controls.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TopTabItemLeftEdge.Disabled
VisualStyleElement.Tab.TopTabItemLeftEdge.Disabled
I n this Article
Gets a visual style element that represents a disabled tab control that shares its bottom and right borders with other
tab controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled tab control that shares its bottom and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemLeftEdge4 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItemLeftEdge4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemLeftEdge.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemLeftEdge.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemLeftEdge.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemLeftEdge.Hot Visual
StyleElement.Tab.TopTabItemLeftEdge.Hot
I n this Article
Gets a visual style element that represents a hot tab control that shares its bottom and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot tab control that shares its bottom and right borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemLeftEdge2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTopTabItemLeftEdge2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemLeftEdge.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemLeftEdge.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemLeftEdge.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemLeftEdge.Normal
VisualStyleElement.Tab.TopTabItemLeftEdge.Normal
I n this Article
Gets a visual style element that represents a normal tab control that shares its bottom and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal tab control that shares its bottom and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemLeftEdge1 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItemLeftEdge1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemLeftEdge.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemLeftEdge.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemLeftEdge.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemLeftEdge.Pressed
VisualStyleElement.Tab.TopTabItemLeftEdge.Pressed
I n this Article
Gets a visual style element that represents a pressed tab control that shares its bottom and right borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed tab control that shares its bottom and right borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemLeftEdge3 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItemLeftEdge3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemLeftEdge.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemLeftEdge.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemLeftEdge.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemRightEdge VisualStyle
Element.Tab.TopTabItemRightEdge Class
Provides VisualStyleElement objects for each state of a tab control that shares its bottom and left borders with other
tab controls. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Tab.TopTabItemRightEdge
type VisualStyleElement.Tab.TopTabItemRightEdge = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Tab.TopTabItemRightEdge class gets a VisualStyleElement for a different state
of a tab control that shares its bottom and left borders with other tab controls.

Properties
Disabled
Disabled

Gets a visual style element that represents a disabled tab control that shares its bottom and left borders with other
tab controls.

Hot
Hot

Gets a visual style element that represents a hot tab control that shares its bottom and left borders with other tab
controls.

Normal
Normal

Gets a visual style element that represents a normal tab control that shares its bottom and left borders with other
tab controls.

Pressed
Pressed

Gets a visual style element that represents a pressed tab control that shares its bottom and left borders with other
tab controls.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Tab.TopTabItemRightEdge.Disabled
VisualStyleElement.Tab.TopTabItemRightEdge.Disabled
I n this Article
Gets a visual style element that represents a disabled tab control that shares its bottom and left borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled tab control that shares its bottom and left borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemRightEdge4 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItemRightEdge4(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemRightEdge.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemRightEdge.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemRightEdge.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemRightEdge.Hot Visual
StyleElement.Tab.TopTabItemRightEdge.Hot
I n this Article
Gets a visual style element that represents a hot tab control that shares its bottom and left borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot tab control that shares its bottom and left borders with other tab controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemRightEdge2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTabTopTabItemRightEdge2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemRightEdge.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemRightEdge.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemRightEdge.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemRightEdge.Normal
VisualStyleElement.Tab.TopTabItemRightEdge.Normal
I n this Article
Gets a visual style element that represents a normal tab control that shares its bottom and left borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal tab control that shares its bottom and left borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemRightEdge1 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItemRightEdge1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemRightEdge.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemRightEdge.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemRightEdge.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Tab.TopTabItemRightEdge.Pressed
VisualStyleElement.Tab.TopTabItemRightEdge.Pressed
I n this Article
Gets a visual style element that represents a pressed tab control that shares its bottom and left borders with other tab
controls.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a pressed tab control that shares its bottom and left borders with other tab
controls.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTabTopTabItemRightEdge3 method from the Paint event-handling method, passing e as
PaintEventArgs.

public void DrawVisualStyleElementTabTopTabItemRightEdge3(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Tab.TopTabItemRightEdge.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItemRightEdge.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Tab.TopTabItemRightEdge.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.TaskBand VisualStyleElement.Task
Band Class
Contains classes that provide VisualStyleElement objects for parts of the taskbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TaskBand
type VisualStyleElement.TaskBand = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.TaskBand class provides a foundation in which the following classes are defined:
VisualStyleElement.TaskBand.FlashButton
VisualStyleElement.TaskBand.FlashButtonGroupMenu
VisualStyleElement.TaskBand.GroupCount
Each of these classes provides a property that returns a VisualStyleElement for the part of the taskbar specified by the
class name.
VisualStyleElement.TaskBand.FlashButton VisualStyle
Element.TaskBand.FlashButton Class
Provides a VisualStyleElement for a flashing window button in the taskbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TaskBand.FlashButton
type VisualStyleElement.TaskBand.FlashButton = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TaskBand.FlashButton class returns a VisualStyleElement that
represents a flashing window button in the taskbar.

Properties
Normal
Normal

Gets a visual style element that represents a flashing window button in the taskbar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TaskBand.FlashButton.Normal Visual
StyleElement.TaskBand.FlashButton.Normal
I n this Article
Gets a visual style element that represents a flashing window button in the taskbar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a flashing window button in the taskbar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskBandFlashButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskBandFlashButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TaskBand.FlashButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TaskBand.FlashButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TaskBand.FlashButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TaskBand.FlashButtonGroupMenu
VisualStyleElement.TaskBand.FlashButtonGroupMenu
Class
Provides a VisualStyleElement for a flashing menu item of a window button in the taskbar. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.TaskBand.FlashButtonGroupMenu
type VisualStyleElement.TaskBand.FlashButtonGroupMenu = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TaskBand.FlashButton class returns a VisualStyleElement that
represents a flashing menu item of a window button in the taskbar.

Properties
Normal
Normal

Gets a visual style element that represents a flashing menu item for a window button in the taskbar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TaskBand.FlashButtonGroupMenu.
Normal VisualStyleElement.TaskBand.FlashButtonGroup
Menu.Normal
I n this Article
Gets a visual style element that represents a flashing menu item for a window button in the taskbar.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a flashing menu item for a window button in the taskbar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskBandFlashButtonGroupMenu1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElement_Button_PushButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.PushButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.PushButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TaskBand.GroupCount VisualStyle
Element.TaskBand.GroupCount Class
Provides a VisualStyleElement for a group counter of the taskbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TaskBand.GroupCount
type VisualStyleElement.TaskBand.GroupCount = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TaskBand.GroupCount class returns a VisualStyleElement that
represents a group counter of the taskbar.

Properties
Normal
Normal

Gets a visual style element that represents a group counter for the taskbar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TaskBand.GroupCount.Normal Visual
StyleElement.TaskBand.GroupCount.Normal
I n this Article
Gets a visual style element that represents a group counter for the taskbar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a group counter for the taskbar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskBandGroupCount1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskBandGroupCount1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TaskBand.GroupCount.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TaskBand.GroupCount.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TaskBand.GroupCount.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar VisualStyleElement.Taskbar
Class
Contains classes that provide VisualStyleElement objects for the parts of the taskbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar
type VisualStyleElement.Taskbar = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Taskbar class provides a foundation in which the following classes are defined:
VisualStyleElement.Taskbar.BackgroundBottom
VisualStyleElement.Taskbar.BackgroundLeft
VisualStyleElement.Taskbar.BackgroundRight
VisualStyleElement.Taskbar.BackgroundTop
VisualStyleElement.Taskbar.SizingBarBottom
VisualStyleElement.Taskbar.SizingBarLeft
VisualStyleElement.Taskbar.SizingBarRight
VisualStyleElement.Taskbar.SizingBarTop
Each of these classes provides a property that returns a VisualStyleElement for the part of the taskbar specified by the
class name.
VisualStyleElement.Taskbar.BackgroundBottom Visual
StyleElement.Taskbar.BackgroundBottom Class
Provides a VisualStyleElement for the background of a taskbar that is docked on the bottom of the screen. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.BackgroundBottom
type VisualStyleElement.Taskbar.BackgroundBottom = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.BackgroundBottom class returns a VisualStyleElement that
represents the background of a taskbar that is docked on the bottom of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the background of a taskbar that is docked on the bottom of the screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.BackgroundBottom.Normal
VisualStyleElement.Taskbar.BackgroundBottom.Normal
I n this Article
Gets a visual style element that represents the background of a taskbar that is docked on the bottom of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of a taskbar that is docked on the bottom of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarBackgroundBotton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarBackgroundBottom1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.BackgroundBottom.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.BackgroundBottom.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.BackgroundBottom.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar.BackgroundLeft VisualStyle
Element.Taskbar.BackgroundLeft Class
Provides a VisualStyleElement for the background of a taskbar that is docked on the left side of the screen. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.BackgroundLeft
type VisualStyleElement.Taskbar.BackgroundLeft = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.BackgroundLeft class returns a VisualStyleElement that
represents the background of a taskbar that is docked on the left side of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the background of a taskbar that is docked on the left side of the screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.BackgroundLeft.Normal
VisualStyleElement.Taskbar.BackgroundLeft.Normal
I n this Article
Gets a visual style element that represents the background of a taskbar that is docked on the left side of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of a taskbar that is docked on the left side of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarBackgroundLeft1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarBackgroundLeft1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.BackgroundLeft.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.BackgroundLeft.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.BackgroundLeft.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar.BackgroundRight VisualStyle
Element.Taskbar.BackgroundRight Class
Provides a VisualStyleElement for the background of a taskbar that is docked on the right side of the screen. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.BackgroundRight
type VisualStyleElement.Taskbar.BackgroundRight = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.BackgroundRight class returns a VisualStyleElement that
represents the background of a taskbar that is docked on the right side of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the background of a taskbar that is docked on the right side of the
screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.BackgroundRight.Normal
VisualStyleElement.Taskbar.BackgroundRight.Normal
I n this Article
Gets a visual style element that represents the background of a taskbar that is docked on the right side of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of a taskbar that is docked on the right side of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarBackgroundRight1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarBackgroundRight1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.BackgroundRight.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.BackgroundRight.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.BackgroundRight.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar.BackgroundTop VisualStyle
Element.Taskbar.BackgroundTop Class
Provides a VisualStyleElement for the background of a taskbar that is docked on the top of the screen. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.BackgroundTop
type VisualStyleElement.Taskbar.BackgroundTop = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.BackgroundTop class returns a VisualStyleElement that
represents the background of a taskbar that is docked on the top of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the background of a taskbar that is docked on the top of the screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.BackgroundTop.Normal Visual
StyleElement.Taskbar.BackgroundTop.Normal
I n this Article
Gets a visual style element that represents the background of a taskbar that is docked on the top of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of a taskbar that is docked on the top of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarBackgroundTop1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarBackgroundTop1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.BackgroundTop.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.BackgroundTop.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.BackgroundTop.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar.SizingBarBottom VisualStyle
Element.Taskbar.SizingBarBottom Class
Provides a VisualStyleElement for the sizing bar of a taskbar that is docked on the bottom of the screen. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.SizingBarBottom
type VisualStyleElement.Taskbar.SizingBarBottom = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.SizingBarBottom class returns a VisualStyleElement that
represents the sizing bar of a taskbar that is docked on the bottom of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the sizing bar for a taskbar that is docked on the bottom of the screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.SizingBarBottom.Normal
VisualStyleElement.Taskbar.SizingBarBottom.Normal
I n this Article
Gets a visual style element that represents the sizing bar for a taskbar that is docked on the bottom of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing bar for a taskbar that is docked on the bottom of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarSizingBarBottom1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarSizingBarBottom1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.SizingBarBottom.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.SizingBarBottom.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.SizingBarBottom.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar.SizingBarLeft VisualStyle
Element.Taskbar.SizingBarLeft Class
Provides a VisualStyleElement for the sizing bar of a taskbar that is docked on the left side of the screen. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.SizingBarLeft
type VisualStyleElement.Taskbar.SizingBarLeft = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.SizingBarLeft class returns a VisualStyleElement that
represents the sizing bar of a taskbar that is docked on the left side of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the sizing bar for a taskbar that is docked on the left side of the screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.SizingBarLeft.Normal Visual
StyleElement.Taskbar.SizingBarLeft.Normal
I n this Article
Gets a visual style element that represents the sizing bar for a taskbar that is docked on the left side of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing bar for a taskbar that is docked on the left side of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarSizingBarLeft1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarSizingBarLeft1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.SizingBarLeft.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.SizingBarLeft.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.SizingBarLeft.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar.SizingBarRight VisualStyle
Element.Taskbar.SizingBarRight Class
Provides a VisualStyleElement for the sizing bar of a taskbar that is docked on the right side of the screen. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.SizingBarRight
type VisualStyleElement.Taskbar.SizingBarRight = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.SizingBarRight class returns a VisualStyleElement that
represents the sizing bar of a taskbar that is docked on the right side of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the sizing bar for a taskbar that is docked on the right side of the
screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.SizingBarRight.Normal Visual
StyleElement.Taskbar.SizingBarRight.Normal
I n this Article
Gets a visual style element that represents the sizing bar for a taskbar that is docked on the right side of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing bar for a taskbar that is docked on the right side of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementSizingBarRight1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarSizingBarRight1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.SizingBarRight.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.SizingBarRight.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.SizingBarRight.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Taskbar.SizingBarTop VisualStyle
Element.Taskbar.SizingBarTop Class
Provides a VisualStyleElement for the sizing bar of a taskbar that is docked on the top of the screen. This class cannot
be inherited.

D eclaration
public static class VisualStyleElement.Taskbar.SizingBarTop
type VisualStyleElement.Taskbar.SizingBarTop = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Taskbar.SizingBarTop class returns a VisualStyleElement that
represents the sizing bar of a taskbar that is docked on the top of the screen.

Properties
Normal
Normal

Gets a visual style element that represents the sizing bar for a taskbar that is docked on the top of the screen.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Taskbar.SizingBarTop.Normal Visual
StyleElement.Taskbar.SizingBarTop.Normal
I n this Article
Gets a visual style element that represents the sizing bar for a taskbar that is docked on the top of the screen.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing bar for a taskbar that is docked on the top of the screen.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarSizingBarTop1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarSizingBarTop1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Taskbar.SizingBarTop.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Taskbar.SizingBarTop.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Taskbar.SizingBarTop.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TaskbarClock VisualStyleElement.
TaskbarClock Class
Contains a class that provides a VisualStyleElement for the background of the taskbar clock. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.TaskbarClock
type VisualStyleElement.TaskbarClock = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.TaskbarClock class provides a foundation in which the VisualStyleElement.TaskbarClock.Time
class is defined. The Normal property of this class returns a VisualStyleElement for the background of the taskbar
clock.
VisualStyleElement.TaskbarClock.Time VisualStyle
Element.TaskbarClock.Time Class
Provides a VisualStyleElement for the background of the taskbar clock. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TaskbarClock.Time
type VisualStyleElement.TaskbarClock.Time = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TaskbarClock.Time class returns a VisualStyleElement that represents
the background of the taskbar clock.

Properties
Normal
Normal

Gets a visual style element that represents the background of the taskbar clock.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TaskbarClock.Time.Normal VisualStyle
Element.TaskbarClock.Time.Normal
I n this Article
Gets a visual style element that represents the background of the taskbar clock.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the taskbar clock.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTaskbarClockTime1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTaskbarClockTime1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TaskbarClock.Time.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TaskbarClock.Time.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TaskbarClock.Time.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TextBox VisualStyleElement.TextBox
Class
Contains classes that provide VisualStyleElement objects for the parts of a text box. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TextBox
type VisualStyleElement.TextBox = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.TextBox class provides a foundation in which the following classes are defined:
VisualStyleElement.TextBox.Caret
VisualStyleElement.TextBox.TextEdit
Each of these classes provides one or more properties that return a VisualStyleElement for each state of the text box
element specified by the class name.
VisualStyleElement.TextBox.Caret VisualStyleElement.Text
Box.Caret Class
Provides a VisualStyleElement for the caret of a text box. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TextBox.Caret
type VisualStyleElement.TextBox.Caret = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TextBox.Caret class returns a VisualStyleElement that represents the
insertion point of a text box.

Properties
Normal
Normal

Gets a visual style element that represents a text box caret.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TextBox.Caret.Normal VisualStyle
Element.TextBox.Caret.Normal
I n this Article
Gets a visual style element that represents a text box caret.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the insertion point of a text box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTextBoxCaret1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxCaret1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.Caret.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.Caret.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.Caret.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TextBox.TextEdit VisualStyleElement.
TextBox.TextEdit Class
Provides VisualStyleElement objects for each state of a text box. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TextBox.TextEdit
type VisualStyleElement.TextBox.TextEdit = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TextBox.TextEdit class returns a VisualStyleElement for a different state of a
text box.

Properties
Assist
Assist

Gets a visual style element that represents a text box in assist mode.

Disabled
Disabled

Gets a visual style element that represents a disabled text box.

Focused
Focused

Gets a visual style element that represents a text box that has focus.

Hot
Hot

Gets a visual style element that represents a hot text box.

Normal
Normal

Gets a visual style element that represents a normal text box.

ReadOnly
ReadOnly

Gets a visual style element that represents a read-only text box.

Selected
Selected

Gets a visual style element that represents a selected text box.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TextBox.TextEdit.Assist VisualStyle
Element.TextBox.TextEdit.Assist
I n this Article
Gets a visual style element that represents a text box in assist mode.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Assist { get; }


member this.Assist : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a text box in assist mode.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Assist property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTextBoxTextEdit7 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxTextEdit7(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.TextEdit.Assist))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.TextEdit.Assist);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.TextEdit.Assist",
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));
}

Remarks
You can use the VisualStyleElement returned by the Assist property to create a VisualStyleRenderer.
VisualStyleElement.TextBox.TextEdit.Disabled VisualStyle
Element.TextBox.TextEdit.Disabled
I n this Article
Gets a visual style element that represents a disabled text box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a disabled text box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTextBoxTextEdit4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxTextEdit4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.TextEdit.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.TextEdit.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.TextEdit.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TextBox.TextEdit.Focused VisualStyle
Element.TextBox.TextEdit.Focused
I n this Article
Gets a visual style element that represents a text box that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Focused { get; }


member this.Focused : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a text box that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Focused property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTextBoxTextEdit5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxTextEdit5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.TextEdit.Focused))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.TextEdit.Focused);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.TextEdit.Focused",
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));
}

Remarks
You can use the VisualStyleElement returned by the Focused property to create a VisualStyleRenderer.
VisualStyleElement.TextBox.TextEdit.Hot VisualStyle
Element.TextBox.TextEdit.Hot
I n this Article
Gets a visual style element that represents a hot text box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a hot text box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTextBoxTextEdit2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxTextEdit2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.TextEdit.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.TextEdit.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.TextEdit.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TextBox.TextEdit.Normal VisualStyle
Element.TextBox.TextEdit.Normal
I n this Article
Gets a visual style element that represents a normal text box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a normal text box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTextBoxTextEdit1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxTextEdit1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.TextEdit.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.TextEdit.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.TextEdit.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TextBox.TextEdit.ReadOnly VisualStyle
Element.TextBox.TextEdit.ReadOnly
I n this Article
Gets a visual style element that represents a read-only text box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement ReadOnly { get; }


member this.ReadOnly : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a read-only text box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the ReadOnly property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementTextBoxTextEdit6 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxTextEdit6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.TextEdit.ReadOnly))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.TextEdit.ReadOnly);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.TextEdit.ReadOnly",
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));
}

Remarks
You can use the VisualStyleElement returned by the ReadOnly property to create a VisualStyleRenderer.
VisualStyleElement.TextBox.TextEdit.Selected VisualStyle
Element.TextBox.TextEdit.Selected
I n this Article
Gets a visual style element that represents a selected text box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Selected { get; }


member this.Selected : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a selected text box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Selected property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTextBoxTextEdit3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TextBox.TextEdit.Selected))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TextBox.TextEdit.Selected);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TextBox.TextEdit.Selected",
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));
}

Remarks
You can use the VisualStyleElement returned by the Selected property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar VisualStyleElement.ToolBar
Class
Contains classes that provide VisualStyleElement objects for the parts of a toolbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolBar
type VisualStyleElement.ToolBar = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.ToolBar class provides a foundation in which the following classes are defined:
VisualStyleElement.ToolBar.Button
VisualStyleElement.ToolBar.DropDownButton
VisualStyleElement.ToolBar.SeparatorHorizontal
VisualStyleElement.ToolBar.SeparatorVertical
VisualStyleElement.ToolBar.SplitButton
VisualStyleElement.ToolBar.SplitButtonDropDown
Each of these classes provides a property that returns one or more VisualStyleElement objects for the part of the
toolbar specified by the class name.
VisualStyleElement.ToolBar.Button VisualStyleElement.
ToolBar.Button Class
Provides VisualStyleElement objects for each state of a toolbar button. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolBar.Button
type VisualStyleElement.ToolBar.Button = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ToolBar.Button class returns a VisualStyleElement for a different state of a
toolbar button.

Properties
Checked
Checked

Gets a visual style element that represents a toolbar button in the checked state.

Disabled
Disabled

Gets a visual style element that represents a toolbar button in the disabled state.

Hot
Hot

Gets a visual style element that represents a toolbar button in the hot state.

HotChecked
HotChecked

Gets a visual style element that represents a toolbar button in the hot and checked states.

Normal
Normal

Gets a visual style element that represents a toolbar button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a toolbar button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolBar.Button.Checked VisualStyle
Element.ToolBar.Button.Checked
I n this Article
Gets a visual style element that represents a toolbar button in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Checked { get; }


member this.Checked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a toolbar button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Checked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarButton5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarButton5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.Button.Checked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.Button.Checked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.Button.Checked",
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));
}

Remarks
You can use the VisualStyleElement returned by the Checked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.Button.Disabled VisualStyle
Element.ToolBar.Button.Disabled
I n this Article
Gets a visual style element that represents a toolbar button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a toolbar button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.Button.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.Button.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.Button.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.Button.Hot VisualStyle
Element.ToolBar.Button.Hot
I n this Article
Gets a visual style element that represents a toolbar button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a toolbar button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.Button.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.Button.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.Button.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.Button.HotChecked Visual
StyleElement.ToolBar.Button.HotChecked
I n this Article
Gets a visual style element that represents a toolbar button in the hot and checked states.

public static System.Windows.Forms.VisualStyles.VisualStyleElement HotChecked { get; }


member this.HotChecked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a toolbar button in the hot and checked states.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the HotChecked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementToolBarButton6 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarButton6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.Button.HotChecked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.Button.HotChecked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.Button.HotChecked",
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));
}

Remarks
You can use the VisualStyleElement returned by the HotChecked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.Button.Normal VisualStyle
Element.ToolBar.Button.Normal
I n this Article
Gets a visual style element that represents a toolbar button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a toolbar button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.Button.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.Button.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.Button.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.Button.Pressed VisualStyle
Element.ToolBar.Button.Pressed
I n this Article
Gets a visual style element that represents a toolbar button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a toolbar button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.Button.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.Button.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.Button.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.DropDownButton VisualStyle
Element.ToolBar.DropDownButton Class
Provides VisualStyleElement objects for each state of a drop-down toolbar button. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolBar.DropDownButton
type VisualStyleElement.ToolBar.DropDownButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ToolBar.DropDownButton class returns a VisualStyleElement for a different
state of a drop-down toolbar button.

Properties
Checked
Checked

Gets a visual style element that represents a drop-down toolbar button in the checked state.

Disabled
Disabled

Gets a visual style element that represents a drop-down toolbar button in the disabled state.

Hot
Hot

Gets a visual style element that represents a drop-down toolbar button in the hot state.

HotChecked
HotChecked

Gets a visual style element that represents a drop-down toolbar button in the hot and checked states.

Normal
Normal

Gets a visual style element that represents a drop-down toolbar button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a drop-down toolbar button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolBar.DropDownButton.Checked
VisualStyleElement.ToolBar.DropDownButton.Checked
I n this Article
Gets a visual style element that represents a drop-down toolbar button in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Checked { get; }


member this.Checked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down toolbar button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Checked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarDropDownButton5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarDropDownButton5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.DropDownButton.Checked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.DropDownButton.Checked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.DropDownButton.Checked",
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));
}

Remarks
You can use the VisualStyleElement returned by the Checked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.DropDownButton.Disabled
VisualStyleElement.ToolBar.DropDownButton.Disabled
I n this Article
Gets a visual style element that represents a drop-down toolbar button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down toolbar button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarDropDownButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarDropDownButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.DropDownButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.DropDownButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.DropDownButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.DropDownButton.Hot Visual
StyleElement.ToolBar.DropDownButton.Hot
I n this Article
Gets a visual style element that represents a drop-down toolbar button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down toolbar button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarDropDownButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarDropDownButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.DropDownButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.DropDownButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.DropDownButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.DropDownButton.Hot
Checked VisualStyleElement.ToolBar.DropDownButton.
HotChecked
I n this Article
Gets a visual style element that represents a drop-down toolbar button in the hot and checked states.
public static System.Windows.Forms.VisualStyles.VisualStyleElement HotChecked { get; }
member this.HotChecked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down toolbar button in the hot and checked states.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the HotChecked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementToolBarDropDownButton6 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarDropDownButton6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.DropDownButton.HotChecked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.DropDownButton.HotChecked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.DropDownButton.HotChecked",
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));
}

Remarks
You can use the VisualStyleElement returned by the HotChecked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.DropDownButton.Normal
VisualStyleElement.ToolBar.DropDownButton.Normal
I n this Article
Gets a visual style element that represents a drop-down toolbar button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down toolbar button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarDropDownButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarDropDownButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.DropDownButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.DropDownButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.DropDownButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.DropDownButton.Pressed
VisualStyleElement.ToolBar.DropDownButton.Pressed
I n this Article
Gets a visual style element that represents a drop-down toolbar button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a drop-down toolbar button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarDropDownButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarDropDownButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.DropDownButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.DropDownButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.DropDownButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SeparatorHorizontal Visual
StyleElement.ToolBar.SeparatorHorizontal Class
Provides a VisualStyleElement for a horizontal separator of the toolbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolBar.SeparatorHorizontal
type VisualStyleElement.ToolBar.SeparatorHorizontal = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ToolBar.SeparatorHorizontal class returns a VisualStyleElement that
represents a horizontal separator of the toolbar.

Properties
Normal
Normal

Gets a visual style element that represents a horizontal separator of the toolbar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolBar.SeparatorHorizontal.Normal
VisualStyleElement.ToolBar.SeparatorHorizontal.Normal
I n this Article
Gets a visual style element that represents a horizontal separator of the toolbar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal separator of the toolbar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSeparatorHorizontal1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSeparatorHorizontal1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SeparatorHorizontal.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SeparatorHorizontal.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SeparatorHorizontal.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SeparatorVertical VisualStyle
Element.ToolBar.SeparatorVertical Class
Provides a VisualStyleElement for a vertical separator of the toolbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolBar.SeparatorVertical
type VisualStyleElement.ToolBar.SeparatorVertical = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ToolBar.SeparatorVertical class returns a VisualStyleElement that
represents a vertical separator of the toolbar.

Properties
Normal
Normal

Gets a visual style element that represents a vertical separator of the toolbar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolBar.SeparatorVertical.Normal
VisualStyleElement.ToolBar.SeparatorVertical.Normal
I n this Article
Gets a visual style element that represents a vertical separator of the toolbar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical separator of the toolbar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSeparatorVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSeparatorVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SeparatorVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SeparatorVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SeparatorVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButton VisualStyle
Element.ToolBar.SplitButton Class
Provides VisualStyleElement objects for each state of the regular button portion of a combined regular button and
drop-down button. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolBar.SplitButton
type VisualStyleElement.ToolBar.SplitButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ToolBar.SplitButton class returns a VisualStyleElement for a different state of
the regular button portion of a combined regular button and drop-down button.

Properties
Checked
Checked

Gets a visual style element that represents a split button in the checked state.

Disabled
Disabled

Gets a visual style element that represents a split button in the disabled state.

Hot
Hot

Gets a visual style element that represents a split button in the hot state.

HotChecked
HotChecked

Gets a visual style element that represents a split button in the hot and checked states.

Normal
Normal

Gets a visual style element that represents a split button in the normal state.
Pressed
Pressed

Gets a visual style element that represents a split button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolBar.SplitButton.Checked Visual
StyleElement.ToolBar.SplitButton.Checked
I n this Article
Gets a visual style element that represents a split button in the checked state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Checked { get; }


member this.Checked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Checked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButton5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButton5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButton.Checked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButton.Checked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButton.Checked",
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));
}

Remarks
You can use the VisualStyleElement returned by the Checked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButton.Disabled Visual
StyleElement.ToolBar.SplitButton.Disabled
I n this Article
Gets a visual style element that represents a split button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButton.Hot VisualStyle
Element.ToolBar.SplitButton.Hot
I n this Article
Gets a visual style element that represents a split button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButton.HotChecked
VisualStyleElement.ToolBar.SplitButton.HotChecked
I n this Article
Gets a visual style element that represents a split button in the hot and checked states.

public static System.Windows.Forms.VisualStyles.VisualStyleElement HotChecked { get; }


member this.HotChecked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split button in the hot and checked states.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the HotChecked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementToolBarSplitButton6 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButton6(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButton.HotChecked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButton.HotChecked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButton.HotChecked",
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));
}

Remarks
You can use the VisualStyleElement returned by the HotChecked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButton.Normal Visual
StyleElement.ToolBar.SplitButton.Normal
I n this Article
Gets a visual style element that represents a split button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButton.Pressed Visual
StyleElement.ToolBar.SplitButton.Pressed
I n this Article
Gets a visual style element that represents a split button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButtonDropDown Visual
StyleElement.ToolBar.SplitButtonDropDown Class
Provides VisualStyleElement objects for each state of the drop-down portion of a combined regular button and drop-
down button. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolBar.SplitButtonDropDown
type VisualStyleElement.ToolBar.SplitButtonDropDown = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ToolBar.SplitButtonDropDown class returns a VisualStyleElement for a
different state of the drop-down portion of a combined regular button and drop-down button.

Properties
Checked
Checked

Gets a visual style element that represents a split drop-down button in the checked state.

Disabled
Disabled

Gets a visual style element that represents a split drop-down button in the disabled state.

Hot
Hot

Gets a visual style element that represents a split drop-down button in the hot state.

HotChecked
HotChecked

Gets a visual style element that represents a split drop-down button in the hot and checked states.

Normal
Normal

Gets a visual style element that represents a split drop-down button in the normal state.
Pressed
Pressed

Gets a visual style element that represents a split drop-down button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolBar.SplitButtonDropDown.
Checked VisualStyleElement.ToolBar.SplitButtonDrop
Down.Checked
I n this Article
Gets a visual style element that represents a split drop-down button in the checked state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Checked { get; }
member this.Checked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split drop-down button in the checked state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Checked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButtonDropDown5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButtonDropDown5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButtonDropDown.Checked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButtonDropDown.Checked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButtonDropDown.Checked",
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));
}

Remarks
You can use the VisualStyleElement returned by the Checked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButtonDropDown.
Disabled VisualStyleElement.ToolBar.SplitButtonDrop
Down.Disabled
I n this Article
Gets a visual style element that represents a split drop-down button in the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split drop-down button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButtonDropDown4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButtonDropDown4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButtonDropDown.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButtonDropDown.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButtonDropDown.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButtonDropDown.Hot
VisualStyleElement.ToolBar.SplitButtonDropDown.Hot
I n this Article
Gets a visual style element that represents a split drop-down button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split drop-down button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButtonDropDown2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButtonDropDown2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButtonDropDown.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButtonDropDown.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButtonDropDown.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButtonDropDown.Hot
Checked VisualStyleElement.ToolBar.SplitButtonDrop
Down.HotChecked
I n this Article
Gets a visual style element that represents a split drop-down button in the hot and checked states.
public static System.Windows.Forms.VisualStyles.VisualStyleElement HotChecked { get; }
member this.HotChecked : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split drop-down button in the hot and checked states.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the HotChecked property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call
the DrawVisualStyleElementToolBarSplitButtonDropDown6 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementToolBarSplitButtonDropDown6(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButtonDropDown.HotChecked))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButtonDropDown.HotChecked);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButtonDropDown.HotChecked",
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));
}

Remarks
You can use the VisualStyleElement returned by the HotChecked property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButtonDropDown.Normal
VisualStyleElement.ToolBar.SplitButtonDropDown.Normal
I n this Article
Gets a visual style element that represents a split drop-down button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split drop-down button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButtonDropDown1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButtonDropDown1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButtonDropDown.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButtonDropDown.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButtonDropDown.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolBar.SplitButtonDropDown.Pressed
VisualStyleElement.ToolBar.SplitButtonDropDown.Pressed
I n this Article
Gets a visual style element that represents a split drop-down button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a split drop-down button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolBarSplitButtonDropDown3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolBarSplitButtonDropDown3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolBar.SplitButtonDropDown.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolBar.SplitButtonDropDown.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolBar.SplitButtonDropDown.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip VisualStyleElement.ToolTip
Class
Contains classes that provide VisualStyleElement objects for the parts of a ToolTip. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolTip
type VisualStyleElement.ToolTip = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.ToolTip class provides a foundation in which the following classes are defined:
VisualStyleElement.ToolTip.Balloon
VisualStyleElement.ToolTip.BalloonTitle
VisualStyleElement.ToolTip.Close
VisualStyleElement.ToolTip.Standard
VisualStyleElement.ToolTip.StandardTitle
Each of these classes provides one or more properties that return a VisualStyleElement for the part of the ToolTip
specified by the class name.
VisualStyleElement.ToolTip.Balloon VisualStyleElement.
ToolTip.Balloon Class
Provides VisualStyleElement objects for a balloon ToolTip. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolTip.Balloon
type VisualStyleElement.ToolTip.Balloon = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ToolTip.Balloon class returns a VisualStyleElement for a balloon ToolTip.

Properties
Link
Link

Gets a visual style element that represents a balloon ToolTip that contains a link.

Normal
Normal

Gets a visual style element that represents a balloon ToolTip that contains text.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolTip.Balloon.Link VisualStyle
Element.ToolTip.Balloon.Link
I n this Article
Gets a visual style element that represents a balloon ToolTip that contains a link.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Link { get; }


member this.Link : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a balloon ToolTip that contains a link.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Link property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipBalloon2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipBalloon2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.Balloon.Link))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.Balloon.Link);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.Balloon.Link",
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));
}

Remarks
You can use the VisualStyleElement returned by the Link property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.Balloon.Normal VisualStyle
Element.ToolTip.Balloon.Normal
I n this Article
Gets a visual style element that represents a balloon ToolTip that contains text.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a balloon ToolTip that contains text.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipBalloon1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipBalloon1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.Balloon.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.Balloon.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.Balloon.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.BalloonTitle VisualStyle
Element.ToolTip.BalloonTitle Class
Provides a VisualStyleElement for the title area of a balloon ToolTip. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolTip.BalloonTitle
type VisualStyleElement.ToolTip.BalloonTitle = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ToolTip.BalloonTitle class returns a VisualStyleElement that represents
the title area of a balloon ToolTip.

Properties
Normal
Normal

Gets a visual style element that represents the title area of a balloon ToolTip.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolTip.BalloonTitle.Normal Visual
StyleElement.ToolTip.BalloonTitle.Normal
I n this Article
Gets a visual style element that represents the title area of a balloon ToolTip.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title area of a balloon ToolTip.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipBalloonTitle1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipBalloonTitle1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.BalloonTitle.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.BalloonTitle.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.BalloonTitle.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.Close VisualStyleElement.Tool
Tip.Close Class
Provides VisualStyleElement objects for each state of the Close button of a ToolTip. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolTip.Close
type VisualStyleElement.ToolTip.Close = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ToolTip.Close class gets a VisualStyleElement for a different state of the Close
button of a ToolTip.

Properties
Hot
Hot

Gets a visual style element that represents the ToolTip Close button in the hot state.

Normal
Normal

Gets a visual style element that represents the ToolTip Close button in the normal state.

Pressed
Pressed

Gets a visual style element that represents the ToolTip Close button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolTip.Close.Hot VisualStyleElement.
ToolTip.Close.Hot
I n this Article
Gets a visual style element that represents the ToolTip Close button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the ToolTip Close button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipClose2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipClose2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.Close.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.Close.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.Close.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.Close.Normal VisualStyle
Element.ToolTip.Close.Normal
I n this Article
Gets a visual style element that represents the ToolTip Close button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the ToolTip Close button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipClose1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipClose1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.Close.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.Close.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.Close.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.Close.Pressed VisualStyle
Element.ToolTip.Close.Pressed
I n this Article
Gets a visual style element that represents the ToolTip Close button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the ToolTip Close button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipClose3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipClose3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.Close.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.Close.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.Close.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.Standard VisualStyleElement.
ToolTip.Standard Class
Provides VisualStyleElement objects for a standard ToolTip. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolTip.Standard
type VisualStyleElement.ToolTip.Standard = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.ToolTip.Standard class returns a VisualStyleElement for a standard ToolTip.

Properties
Link
Link

Gets a visual style element that represents a standard ToolTip that contains a link.

Normal
Normal

Gets a visual style element that represents a standard ToolTip that contains text.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolTip.Standard.Link VisualStyle
Element.ToolTip.Standard.Link
I n this Article
Gets a visual style element that represents a standard ToolTip that contains a link.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Link { get; }


member this.Link : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a standard ToolTip that contains a link.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Link property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipStandard2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipStandard2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.Standard.Link))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.Standard.Link);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.Standard.Link",
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));
}

Remarks
You can use the VisualStyleElement returned by the Link property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.Standard.Normal VisualStyle
Element.ToolTip.Standard.Normal
I n this Article
Gets a visual style element that represents a standard ToolTip that contains text.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a standard ToolTip that contains text.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipStandard1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipStandard1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.Standard.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.Standard.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.Standard.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.ToolTip.StandardTitle VisualStyle
Element.ToolTip.StandardTitle Class
Provides a VisualStyleElement for the title area of a standard ToolTip. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.ToolTip.StandardTitle
type VisualStyleElement.ToolTip.StandardTitle = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.ToolTip.StandardTitle class returns a VisualStyleElement that
represents the title area of a standard ToolTip.

Properties
Normal
Normal

Gets a visual style element that represents the title area of a standard ToolTip.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.ToolTip.StandardTitle.Normal Visual
StyleElement.ToolTip.StandardTitle.Normal
I n this Article
Gets a visual style element that represents the title area of a standard ToolTip.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title area of a standard ToolTip.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementToolTipStandardTitle1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementToolTipStandardTitle1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.ToolTip.StandardTitle.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.ToolTip.StandardTitle.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.ToolTip.StandardTitle.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar VisualStyleElement.TrackBar
Class
Contains classes that provide VisualStyleElement objects for the parts of the track bar control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.TrackBar
type VisualStyleElement.TrackBar = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.TrackBar class provides a foundation in which the following classes are defined:
VisualStyleElement.TrackBar.Thumb
VisualStyleElement.TrackBar.ThumbBottom
VisualStyleElement.TrackBar.ThumbLeft
VisualStyleElement.TrackBar.ThumbRight
VisualStyleElement.TrackBar.ThumbTop
VisualStyleElement.TrackBar.ThumbVertical
VisualStyleElement.TrackBar.Ticks
VisualStyleElement.TrackBar.TicksVertical
VisualStyleElement.TrackBar.Track
VisualStyleElement.TrackBar.TrackVertical
Each of these classes provides a property that returns one or more VisualStyleElement objects for the part of the track
bar specified by the class name.
VisualStyleElement.TrackBar.Thumb VisualStyleElement.
TrackBar.Thumb Class
Provides VisualStyleElement objects for each state of the slider (also known as the thumb) of a horizontal track bar.
This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.Thumb
type VisualStyleElement.TrackBar.Thumb = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TrackBar.Thumb class returns a VisualStyleElement for a different state of the
slider of a horizontal track bar.

Properties
Disabled
Disabled

Gets a visual style element that represents the slider of a horizontal track bar in the disabled state.

Focused
Focused

Gets a visual style element that represents the slider of a horizontal track bar that has focus.

Hot
Hot

Gets a visual style element that represents the slider of a horizontal track bar in the hot state.

Normal
Normal

Gets a visual style element that represents the slider of a horizontal track bar in the normal state.

Pressed
Pressed

Gets a visual style element that represents the slider of a horizontal track bar in the pressed state.
See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.Thumb.Disabled VisualStyle
Element.TrackBar.Thumb.Disabled
I n this Article
Gets a visual style element that represents the slider of a horizontal track bar in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a horizontal track bar in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumb5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumb5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.Thumb.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.Thumb.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.Thumb.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.Thumb.Focused VisualStyle
Element.TrackBar.Thumb.Focused
I n this Article
Gets a visual style element that represents the slider of a horizontal track bar that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Focused { get; }


member this.Focused : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a horizontal track bar that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Focused property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumb4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumb4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.Thumb.Focused))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.Thumb.Focused);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.Thumb.Focused",
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));
}

Remarks
You can use the VisualStyleElement returned by the Focused property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.Thumb.Hot VisualStyle
Element.TrackBar.Thumb.Hot
I n this Article
Gets a visual style element that represents the slider of a horizontal track bar in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a horizontal track bar in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumb2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumb2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.Thumb.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.Thumb.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.Thumb.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.Thumb.Normal VisualStyle
Element.TrackBar.Thumb.Normal
I n this Article
Gets a visual style element that represents the slider of a horizontal track bar in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a horizontal track bar in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumb1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumb1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.Thumb.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.Thumb.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.Thumb.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.Thumb.Pressed VisualStyle
Element.TrackBar.Thumb.Pressed
I n this Article
Gets a visual style element that represents the slider of a horizontal track bar in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a horizontal track bar in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumb3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumb3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.Thumb.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.Thumb.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.Thumb.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbBottom VisualStyle
Element.TrackBar.ThumbBottom Class
Provides VisualStyleElement objects for each state of the downward-pointing track bar slider (also known as the
thumb). This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.ThumbBottom
type VisualStyleElement.TrackBar.ThumbBottom = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TrackBar.ThumbBottom class returns a VisualStyleElement for a different
state of the downward-pointing track bar slider.

Properties
Disabled
Disabled

Gets a visual style element that represents a downward-pointing track bar slider in the disabled state.

Focused
Focused

Gets a visual style element that represents a downward-pointing track bar slider that has focus.

Hot
Hot

Gets a visual style element that represents a downward-pointing track bar slider in the hot state.

Normal
Normal

Gets a visual style element that represents a downward-pointing track bar slider in the normal state.

Pressed
Pressed

Gets a visual style element that represents a downward-pointing track bar slider in the pressed state.
See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.ThumbBottom.Disabled
VisualStyleElement.TrackBar.ThumbBottom.Disabled
I n this Article
Gets a visual style element that represents a downward-pointing track bar slider in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing track bar slider in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbBottom5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbBottom5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbBottom.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbBottom.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbBottom.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbBottom.Focused
VisualStyleElement.TrackBar.ThumbBottom.Focused
I n this Article
Gets a visual style element that represents a downward-pointing track bar slider that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Focused { get; }


member this.Focused : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing track bar slider that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Focused property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbBottom4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbBottom4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbBottom.Focused))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbBottom.Focused);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbBottom.Focused",
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));
}

Remarks
You can use the VisualStyleElement returned by the Focused property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbBottom.Hot Visual
StyleElement.TrackBar.ThumbBottom.Hot
I n this Article
Gets a visual style element that represents a downward-pointing track bar slider in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing track bar slider in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbBottom2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbBottom2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbBottom.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbBottom.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbBottom.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbBottom.Normal Visual
StyleElement.TrackBar.ThumbBottom.Normal
I n this Article
Gets a visual style element that represents a downward-pointing track bar slider in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing track bar slider in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbBottom1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbBottom1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbBottom.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbBottom.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbBottom.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbBottom.Pressed Visual
StyleElement.TrackBar.ThumbBottom.Pressed
I n this Article
Gets a visual style element that represents a downward-pointing track bar slider in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a downward-pointing track bar slider in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbBottom3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbBottom3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbBottom.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbBottom.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbBottom.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbLeft VisualStyle
Element.TrackBar.ThumbLeft Class
Provides VisualStyleElement objects for each state of the left-pointing track bar slider (also known as the thumb). This
class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.ThumbLeft
type VisualStyleElement.TrackBar.ThumbLeft = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TrackBar.ThumbLeft class returns a VisualStyleElement for a different state of
the left-pointing track bar slider.

Properties
Disabled
Disabled

Gets a visual style element that represents a left-pointing track bar slider in the disabled state.

Focused
Focused

Gets a visual style element that represents a left-pointing track bar slider that has focus.

Hot
Hot

Gets a visual style element that represents a left-pointing track bar slider in the hot state.

Normal
Normal

Gets a visual style element that represents a left-pointing track bar slider in the normal state.

Pressed
Pressed

Gets a visual style element that represents a left-pointing track bar slider in the pressed state.
See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.ThumbLeft.Disabled Visual
StyleElement.TrackBar.ThumbLeft.Disabled
I n this Article
Gets a visual style element that represents a left-pointing track bar slider in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing track bar slider in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbLeft5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbLeft5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbLeft.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbLeft.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbLeft.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbLeft.Focused Visual
StyleElement.TrackBar.ThumbLeft.Focused
I n this Article
Gets a visual style element that represents a left-pointing track bar slider that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Focused { get; }


member this.Focused : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing track bar slider that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Focused property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbLeft4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbLeft4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbLeft.Focused))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbLeft.Focused);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbLeft.Focused",
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));
}

Remarks
You can use the VisualStyleElement returned by the Focused property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbLeft.Hot VisualStyle
Element.TrackBar.ThumbLeft.Hot
I n this Article
Gets a visual style element that represents a left-pointing track bar slider in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing track bar slider in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbLeft2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbLeft2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbLeft.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbLeft.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbLeft.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbLeft.Normal Visual
StyleElement.TrackBar.ThumbLeft.Normal
I n this Article
Gets a visual style element that represents a left-pointing track bar slider in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing track bar slider in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbLeft1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbLeft1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbLeft.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbLeft.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbLeft.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbLeft.Pressed Visual
StyleElement.TrackBar.ThumbLeft.Pressed
I n this Article
Gets a visual style element that represents a left-pointing track bar slider in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a left-pointing track bar slider in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbLeft3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbLeft3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbLeft.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbLeft.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbLeft.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbRight VisualStyle
Element.TrackBar.ThumbRight Class
Provides VisualStyleElement objects for each state of the right-pointing track bar slider (also known as the thumb).
This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.ThumbRight
type VisualStyleElement.TrackBar.ThumbRight = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TrackBar.ThumbRight class returns a VisualStyleElement for a different state
of the right-pointing track bar slider.

Properties
Disabled
Disabled

Gets a visual style element that represents a right-pointing track bar slider in the disabled state.

Focused
Focused

Gets a visual style element that represents a right-pointing track bar slider that has focus.

Hot
Hot

Gets a visual style element that represents a right-pointing track bar slider in the hot state.

Normal
Normal

Gets a visual style element that represents a right-pointing track bar slider in the normal state.

Pressed
Pressed

Gets a visual style element that represents a right-pointing track bar slider in the pressed state.
See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.ThumbRight.Disabled Visual
StyleElement.TrackBar.ThumbRight.Disabled
I n this Article
Gets a visual style element that represents a right-pointing track bar slider in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing track bar slider in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbRight5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbRight5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbRight.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbRight.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbRight.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbRight.Focused Visual
StyleElement.TrackBar.ThumbRight.Focused
I n this Article
Gets a visual style element that represents a right-pointing track bar slider that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Focused { get; }


member this.Focused : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing track bar slider that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Focused property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbRight4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbRight4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbRight.Focused))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbRight.Focused);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbRight.Focused",
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));
}

Remarks
You can use the VisualStyleElement returned by the Focused property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbRight.Hot VisualStyle
Element.TrackBar.ThumbRight.Hot
I n this Article
Gets a visual style element that represents a right-pointing track bar slider in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing track bar slider in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbRight2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbRight2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbRight.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbRight.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbRight.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbRight.Normal Visual
StyleElement.TrackBar.ThumbRight.Normal
I n this Article
Gets a visual style element that represents a right-pointing track bar slider in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing track bar slider in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbRight1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbRight1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbRight.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbRight.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbRight.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbRight.Pressed Visual
StyleElement.TrackBar.ThumbRight.Pressed
I n this Article
Gets a visual style element that represents a right-pointing track bar slider in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a right-pointing track bar slider in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbRight3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbRight3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbRight.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbRight.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbRight.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbTop VisualStyle
Element.TrackBar.ThumbTop Class
Provides VisualStyleElement objects for each state of the upward-pointing track bar slider (also known as the thumb).
This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.ThumbTop
type VisualStyleElement.TrackBar.ThumbTop = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TrackBar.ThumbTop class returns a VisualStyleElement for a different state of
the upward-pointing track bar slider.

Properties
Disabled
Disabled

Gets a visual style element that represents an upward-pointing track bar slider in the disabled state.

Focused
Focused

Gets a visual style element that represents an upward-pointing track bar slider that has focus.

Hot
Hot

Gets a visual style element that represents an upward-pointing track bar slider in the hot state.

Normal
Normal

Gets a visual style element that represents an upward-pointing track bar slider in the normal state.

Pressed
Pressed

Gets a visual style element that represents an upward-pointing track bar slider in the pressed state.
See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.ThumbTop.Disabled Visual
StyleElement.TrackBar.ThumbTop.Disabled
I n this Article
Gets a visual style element that represents an upward-pointing track bar slider in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing track bar slider in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbTop5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbTop5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbTop.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbTop.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbTop.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbTop.Focused Visual
StyleElement.TrackBar.ThumbTop.Focused
I n this Article
Gets a visual style element that represents an upward-pointing track bar slider that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Focused { get; }


member this.Focused : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing track bar slider that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Focused property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbTop4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbTop4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbTop.Focused))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbTop.Focused);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbTop.Focused",
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));
}

Remarks
You can use the VisualStyleElement returned by the Focused property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbTop.Hot VisualStyle
Element.TrackBar.ThumbTop.Hot
I n this Article
Gets a visual style element that represents an upward-pointing track bar slider in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing track bar slider in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbTop2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbTop2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbTop.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbTop.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbTop.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbTop.Normal Visual
StyleElement.TrackBar.ThumbTop.Normal
I n this Article
Gets a visual style element that represents an upward-pointing track bar slider in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing track bar slider in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbTop1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbTop1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbTop.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbTop.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbTop.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbTop.Pressed Visual
StyleElement.TrackBar.ThumbTop.Pressed
I n this Article
Gets a visual style element that represents an upward-pointing track bar slider in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an upward-pointing track bar slider in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbTop3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbTop3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbTop.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbTop.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbTop.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbVertical VisualStyle
Element.TrackBar.ThumbVertical Class
Provides VisualStyleElement objects for each state of the slider (also known as the thumb) of a vertical track bar. This
class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.ThumbVertical
type VisualStyleElement.TrackBar.ThumbVertical = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TrackBar.ThumbVertical class returns a VisualStyleElement for a different
state of the slider for a vertical track bar.

Properties
Disabled
Disabled

Gets a visual style element that represents the slider of a vertical track bar in the disabled state.

Focused
Focused

Gets a visual style element that represents the slider of a vertical track bar that has focus.

Hot
Hot

Gets a visual style element that represents the slider of a vertical track bar in the hot state.

Normal
Normal

Gets a visual style element that represents the slider of a vertical track bar in the normal state.

Pressed
Pressed

Gets a visual style element that represents the slider of a vertical track bar in the pressed state.
See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.ThumbVertical.Disabled
VisualStyleElement.TrackBar.ThumbVertical.Disabled
I n this Article
Gets a visual style element that represents the slider of a vertical track bar in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a vertical track bar in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbVertical5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbVertical5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbVertical.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbVertical.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbVertical.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbVertical.Focused
VisualStyleElement.TrackBar.ThumbVertical.Focused
I n this Article
Gets a visual style element that represents the slider of a vertical track bar that has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Focused { get; }


member this.Focused : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a vertical track bar that has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Focused property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbVertical4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbVertical4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbVertical.Focused))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbVertical.Focused);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbVertical.Focused",
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));
}

Remarks
You can use the VisualStyleElement returned by the Focused property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbVertical.Hot Visual
StyleElement.TrackBar.ThumbVertical.Hot
I n this Article
Gets a visual style element that represents the slider of a vertical track bar in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a vertical track bar in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbVertical2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbVertical2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbVertical.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbVertical.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbVertical.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbVertical.Normal Visual
StyleElement.TrackBar.ThumbVertical.Normal
I n this Article
Gets a visual style element that represents the slider of a vertical track bar in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a vertical track bar in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.ThumbVertical.Pressed Visual
StyleElement.TrackBar.ThumbVertical.Pressed
I n this Article
Gets a visual style element that represents the slider of a vertical track bar in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the slider of a vertical track bar in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarThumbVertical3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarThumbVertical3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.ThumbVertical.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.ThumbVertical.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.ThumbVertical.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.Ticks VisualStyleElement.
TrackBar.Ticks Class
Provides a VisualStyleElement for a single tick of a horizontal track bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.Ticks
type VisualStyleElement.TrackBar.Ticks = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TrackBar.Ticks class returns a VisualStyleElement that represents a
single tick of a horizontal track bar.

Properties
Normal
Normal

Gets a visual style element that represents a single tick of a horizontal track bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.Ticks.Normal VisualStyle
Element.TrackBar.Ticks.Normal
I n this Article
Gets a visual style element that represents a single tick of a horizontal track bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a single tick of a horizontal track bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarTicks1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarTicks1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.Ticks.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.Ticks.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.Ticks.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.TicksVertical VisualStyle
Element.TrackBar.TicksVertical Class
Provides a VisualStyleElement for a single tick of a vertical track bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.TicksVertical
type VisualStyleElement.TrackBar.TicksVertical = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TrackBar.TicksVertical class returns a VisualStyleElement that
represents a single tick of a vertical track bar.

Properties
Normal
Normal

Gets a visual style element that represents a single tick of a vertical track bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.TicksVertical.Normal Visual
StyleElement.TrackBar.TicksVertical.Normal
I n this Article
Gets a visual style element that represents a single tick of a vertical track bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a single tick of a vertical track bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarTicksVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarTicksVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.TicksVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.TicksVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.TicksVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.Track VisualStyleElement.
TrackBar.Track Class
Provides a VisualStyleElement for the track for a horizontal track bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.Track
type VisualStyleElement.TrackBar.Track = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TrackBar.Track class returns a VisualStyleElement that represents the
track for a horizontal track bar.

Properties
Normal
Normal

Gets a visual style element that represents the track for a horizontal track bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.Track.Normal VisualStyle
Element.TrackBar.Track.Normal
I n this Article
Gets a visual style element that represents the track for a horizontal track bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the track for a horizontal track bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarTrack1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarTrack1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.Track.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.Track.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.Track.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrackBar.TrackVertical VisualStyle
Element.TrackBar.TrackVertical Class
Provides a VisualStyleElement for the track for a vertical track bar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrackBar.TrackVertical
type VisualStyleElement.TrackBar.TrackVertical = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TrackBar.TrackVertical class returns a VisualStyleElement that
represents the track for a vertical track bar.

Properties
Normal
Normal

Gets a visual style element that represents the track for a vertical track bar.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrackBar.TrackVertical.Normal Visual
StyleElement.TrackBar.TrackVertical.Normal
I n this Article
Gets a visual style element that represents the track for a vertical track bar.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the track for a vertical track bar.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrackBarTrackVertical1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrackBarTrackVertical1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrackBar.TrackVertical.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrackBar.TrackVertical.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrackBar.TrackVertical.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrayNotify VisualStyleElement.Tray
Notify Class
Contains classes that provide VisualStyleElement objects for the background of the notification area, which is located at
the far right of the taskbar. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrayNotify
type VisualStyleElement.TrayNotify = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.TrayNotify class provides a foundation in which the following classes are defined:
VisualStyleElement.TrayNotify.AnimateBackground
VisualStyleElement.TrayNotify.Background
Each of these classes provides a property that returns a VisualStyleElement for the notification area background
specified by the class name.
VisualStyleElement.TrayNotify.AnimateBackground Visual
StyleElement.TrayNotify.AnimateBackground Class
Provides a VisualStyleElement for an animated background of the notification area. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrayNotify.AnimateBackground
type VisualStyleElement.TrayNotify.AnimateBackground = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TrayNotify.AnimateBackground class returns a VisualStyleElement
that represents an animated background of the notification area, which is located at the far right of the taskbar.

Properties
Normal
Normal

Gets a visual style element that represents an animated background of the notification area.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrayNotify.AnimateBackground.
Normal VisualStyleElement.TrayNotify.Animate
Background.Normal
I n this Article
Gets a visual style element that represents an animated background of the notification area.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents an animated background of the notification area.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrayNotifyAnimateBackground1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementTrayNotifyAnimateBackground1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrayNotify.AnimateBackground.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrayNotify.AnimateBackground.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrayNotify.AnimateBackground.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TrayNotify.Background VisualStyle
Element.TrayNotify.Background Class
Provides a VisualStyleElement for the background of the notification area. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TrayNotify.Background
type VisualStyleElement.TrayNotify.Background = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TrayNotify.Background class returns a VisualStyleElement that
represents the background of the notification area, which is located at the far right of the taskbar.

Properties
Normal
Normal

Gets a visual style element that represents the background of the notification area.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TrayNotify.Background.Normal Visual
StyleElement.TrayNotify.Background.Normal
I n this Article
Gets a visual style element that represents the background of the notification area.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of the notification area.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTrayNotifyBackground1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTrayNotifyBackground1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TrayNotify.Background.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TrayNotify.Background.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TrayNotify.Background.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TreeView VisualStyleElement.TreeView
Class
Contains classes that provide VisualStyleElement objects for the parts of the tree view control. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.TreeView
type VisualStyleElement.TreeView = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.TreeView class provides a foundation in which the following classes are defined:
VisualStyleElement.TreeView.Branch
VisualStyleElement.TreeView.Glyph
VisualStyleElement.TreeView.Item
Each of these classes provides one or more properties that return a VisualStyleElement for the tree view part specified
by the class name.
VisualStyleElement.TreeView.Branch VisualStyleElement.
TreeView.Branch Class
Provides a VisualStyleElement for a tree view branch. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TreeView.Branch
type VisualStyleElement.TreeView.Branch = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.TreeView.Branch class returns a VisualStyleElement that represents a
branch of a tree view control.

Properties
Normal
Normal

Gets a visual style element that represents a tree view branch.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TreeView.Branch.Normal VisualStyle
Element.TreeView.Branch.Normal
I n this Article
Gets a visual style element that represents a tree view branch.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tree view branch.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTreeViewBranch1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewBranch1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Branch.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Branch.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Branch.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TreeView.Glyph VisualStyleElement.
TreeView.Glyph Class
Provides VisualStyleElement objects for the plus sign (+) and minus sign (-) buttons of a tree view control. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.TreeView.Glyph
type VisualStyleElement.TreeView.Glyph = class

I nheritance H ierarchy
Object Object

Remarks
The properties of the VisualStyleElement.TreeView.Glyph class get a VisualStyleElement for the plus sign and minus
sign buttons that display next to a tree view node that contains child elements.

Properties
Closed
Closed

Gets a visual style element that represents a minus sign (-) button of a tree view node.

Opened
Opened

Gets a visual style element that represents a plus sign (+) button of a tree view node.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TreeView.Glyph.Closed VisualStyle
Element.TreeView.Glyph.Closed
I n this Article
Gets a visual style element that represents a minus sign (-) button of a tree view node.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Closed { get; }


member this.Closed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a minus sign button of a tree view node.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Closed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTreeViewGlyph2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewGlyph2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Glyph.Opened))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Glyph.Opened);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Glyph.Opened",
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));
}

Remarks
You can use the VisualStyleElement returned by the Closed property to create a VisualStyleRenderer.
VisualStyleElement.TreeView.Glyph.Opened VisualStyle
Element.TreeView.Glyph.Opened
I n this Article
Gets a visual style element that represents a plus sign (+) button of a tree view node.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Opened { get; }


member this.Opened : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a plus sign button of a tree view node.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Opened property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTreeViewGlyph1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewGlyph1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Glyph.Closed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Glyph.Closed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Glyph.Closed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Opened property to create a VisualStyleRenderer.
VisualStyleElement.TreeView.Item VisualStyleElement.
TreeView.Item Class
Provides VisualStyleElement objects for each state of a tree view item. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.TreeView.Item
type VisualStyleElement.TreeView.Item = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.TreeView.Item class returns a VisualStyleElement for a different state of a tree
view item.

Properties
Disabled
Disabled

Gets a visual style element that represents a tree view item in the disabled state.

Hot
Hot

Gets a visual style element that represents a tree view item in the hot state.

Normal
Normal

Gets a visual style element that represents a tree view item in the normal state.

Selected
Selected

Gets a visual style element that represents a tree view item that is in the selected state and has focus.

SelectedNotFocus
SelectedNotFocus

Gets a visual style element that represents a tree view item that is in the selected state but does not have focus.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.TreeView.Item.Disabled VisualStyle
Element.TreeView.Item.Disabled
I n this Article
Gets a visual style element that represents a tree view item in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tree view item in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTreeViewItem4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewItem4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Item.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Item.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Item.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.TreeView.Item.Hot VisualStyle
Element.TreeView.Item.Hot
I n this Article
Gets a visual style element that represents a tree view item in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tree view item in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTreeViewItem2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewItem2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Item.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Item.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Item.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.TreeView.Item.Normal VisualStyle
Element.TreeView.Item.Normal
I n this Article
Gets a visual style element that represents a tree view item in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tree view item in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTreeViewItem1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewItem1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Item.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Item.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Item.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.TreeView.Item.Selected VisualStyle
Element.TreeView.Item.Selected
I n this Article
Gets a visual style element that represents a tree view item that is in the selected state and has focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Selected { get; }


member this.Selected : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tree view item that is in the selected state and has focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Selected property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementTreeViewItem3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewItem3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Item.Selected))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Item.Selected);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Item.Selected",
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));
}

Remarks
You can use the VisualStyleElement returned by the Selected property to create a VisualStyleRenderer.
VisualStyleElement.TreeView.Item.SelectedNotFocus
VisualStyleElement.TreeView.Item.SelectedNotFocus
I n this Article
Gets a visual style element that represents a tree view item that is in the selected state but does not have focus.

public static System.Windows.Forms.VisualStyles.VisualStyleElement SelectedNotFocus { get; }


member this.SelectedNotFocus : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a tree view item that is in the selected state but does not have focus.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the SelectedNotFocus property. To run this example, paste it into a Windows Form. Handle the form's Paint event
and call the DrawVisualStyleElementTreeViewItem5 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementTreeViewItem5(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.TreeView.Item.SelectedNotFocus))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.TreeView.Item.SelectedNotFocus);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.TreeView.Item.SelectedNotFocus",
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));
}

Remarks
You can use the VisualStyleElement returned by the SelectedNotFocus property to create a VisualStyleRenderer.
VisualStyleElement.Window VisualStyleElement.Window
Class
Contains classes that provide VisualStyleElement objects for the parts of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window
type VisualStyleElement.Window = class

I nheritance H ierarchy
Object Object

Remarks
The VisualStyleElement.Window class provides a foundation in which the following classes are defined:
VisualStyleElement.Window.Caption
VisualStyleElement.Window.CaptionSizingTemplate
VisualStyleElement.Window.CloseButton
VisualStyleElement.Window.Dialog
VisualStyleElement.Window.FrameBottom
VisualStyleElement.Window.FrameBottomSizingTemplate
VisualStyleElement.Window.FrameLeft
VisualStyleElement.Window.FrameLeftSizingTemplate
VisualStyleElement.Window.FrameRight
VisualStyleElement.Window.FrameRightSizingTemplate
VisualStyleElement.Window.HelpButton
VisualStyleElement.Window.HorizontalScroll
VisualStyleElement.Window.HorizontalThumb
VisualStyleElement.Window.MaxButton
VisualStyleElement.Window.MaxCaption
VisualStyleElement.Window.MdiCloseButton
VisualStyleElement.Window.MdiHelpButton
VisualStyleElement.Window.MdiMinButton
VisualStyleElement.Window.MdiRestoreButton
VisualStyleElement.Window.MdiSysButton
VisualStyleElement.Window.MinButton
VisualStyleElement.Window.MinCaption
VisualStyleElement.Window.RestoreButton
VisualStyleElement.Window.SmallCaption
VisualStyleElement.Window.SmallCaptionSizingTemplate
VisualStyleElement.Window.SmallCloseButton
VisualStyleElement.Window.SmallFrameBottom
VisualStyleElement.Window.SmallFrameBottomSizingTemplate
VisualStyleElement.Window.SmallFrameLeft
VisualStyleElement.Window.SmallFrameLeftSizingTemplate
VisualStyleElement.Window.SmallFrameRight
VisualStyleElement.Window.SmallFrameRightSizingTemplate
VisualStyleElement.Window.SmallMaxCaption
VisualStyleElement.Window.SmallMinCaption
VisualStyleElement.Window.SysButton
VisualStyleElement.Window.VerticalScroll
VisualStyleElement.Window.VerticalThumb
Each of these classes provides one or more properties that return a VisualStyleElement for the part of the window
specified by the class name.
VisualStyleElement.Window.Caption VisualStyleElement.
Window.Caption Class
Provides VisualStyleElement objects for each state of the title bar of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.Caption
type VisualStyleElement.Window.Caption = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.Caption class returns a VisualStyleElement for a different state of the
title bar of a window.

Properties
Active
Active

Gets a visual style element that represents the title bar of an active window.

Disabled
Disabled

Gets a visual style element that represents the title bar of a disabled window.

Inactive
Inactive

Gets a visual style element that represents the title bar of an inactive window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.Caption.Active VisualStyle
Element.Window.Caption.Active
I n this Article
Gets a visual style element that represents the title bar of an active window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an active window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCaption1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowCaption1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.Caption.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.Caption.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.Caption.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.Caption.Disabled VisualStyle
Element.Window.Caption.Disabled
I n this Article
Gets a visual style element that represents the title bar of a disabled window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a disabled window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCaption3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowCaption3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.Caption.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.Caption.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.Caption.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.Caption.Inactive VisualStyle
Element.Window.Caption.Inactive
I n this Article
Gets a visual style element that represents the title bar of an inactive window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an inactive window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCaption2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowCaption2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.Caption.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.Caption.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.Caption.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.CaptionSizingTemplate
VisualStyleElement.Window.CaptionSizingTemplate Class
Provides a VisualStyleElement that represents the sizing template of the title bar of a window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.CaptionSizingTemplate
type VisualStyleElement.Window.CaptionSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.CaptionSizingTemplate class returns a VisualStyleElement
that represents the sizing template of the title bar of a window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the title bar of a window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.CaptionSizingTemplate.
Normal VisualStyleElement.Window.CaptionSizing
Template.Normal
I n this Article
Gets a visual style element that represents the sizing template of the title bar of a window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the title bar of a window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCaptionSizingTemplate1 method from the Paint event-handling method, passing e
as PaintEventArgs.
public void DrawVisualStyleElementWindowCaptionSizingTemplate1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.CaptionSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.CaptionSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.CaptionSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.CloseButton VisualStyle
Element.Window.CloseButton Class
Provides VisualStyleElement objects for each state of the Close button of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.CloseButton
type VisualStyleElement.Window.CloseButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.CloseButton class returns a VisualStyleElement for a different state
of the Close button of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a Close button in the disabled state.

Hot
Hot

Gets a visual style element that represents a Close button in the hot state.

Normal
Normal

Gets a visual style element that represents a Close button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a Close button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.CloseButton.Disabled Visual
StyleElement.Window.CloseButton.Disabled
I n this Article
Gets a visual style element that represents a Close button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Close button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCloseButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowCloseButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.CloseButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.CloseButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.CloseButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.CloseButton.Hot VisualStyle
Element.Window.CloseButton.Hot
I n this Article
Gets a visual style element that represents a Close button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Close button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCloseButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowCloseButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.CloseButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.CloseButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.CloseButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.CloseButton.Normal Visual
StyleElement.Window.CloseButton.Normal
I n this Article
Gets a visual style element that represents a Close button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Close button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCloseButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowCloseButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.CloseButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.CloseButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.CloseButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.CloseButton.Pressed Visual
StyleElement.Window.CloseButton.Pressed
I n this Article
Gets a visual style element that represents a Close button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Close button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowCloseButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowCloseButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.CloseButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.CloseButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.CloseButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.Dialog VisualStyleElement.
Window.Dialog Class
Provides a VisualStyleElement for the background of a dialog box. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.Dialog
type VisualStyleElement.Window.Dialog = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.Dialog class returns a VisualStyleElement that represents the
background of a dialog box.

Properties
Normal
Normal

Gets a visual style element that represents the background of a dialog box.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.Dialog.Normal VisualStyle
Element.Window.Dialog.Normal
I n this Article
Gets a visual style element that represents the background of a dialog box.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the background of a dialog box.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowDialog1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowDialog1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.Dialog.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.Dialog.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.Dialog.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameBottom VisualStyle
Element.Window.FrameBottom Class
Provides VisualStyleElement objects for each state of the bottom border of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.FrameBottom
type VisualStyleElement.Window.FrameBottom = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.FrameBottom class returns a VisualStyleElement for a different state
of the bottom border of a window.

Properties
Active
Active

Gets a visual style element that represents the bottom border of an active window.

Inactive
Inactive

Gets a visual style element that represents the bottom border of an inactive window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.FrameBottom.Active Visual
StyleElement.Window.FrameBottom.Active
I n this Article
Gets a visual style element that represents the bottom border of an active window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the bottom border of an active window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameBottom1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowFrameBottom1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameBottom.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameBottom.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameBottom.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameBottom.Inactive Visual
StyleElement.Window.FrameBottom.Inactive
I n this Article
Gets a visual style element that represents the bottom border of an inactive window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the bottom border of an inactive window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameBottom1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowFrameBottom2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameBottom.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameBottom.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameBottom.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameBottomSizingTemplate
VisualStyleElement.Window.FrameBottomSizingTemplate
Class
Provides a VisualStyleElement that represents the sizing template of the bottom border of a window. This class cannot
be inherited.

D eclaration
public static class VisualStyleElement.Window.FrameBottomSizingTemplate
type VisualStyleElement.Window.FrameBottomSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.FrameBottomSizingTemplate class returns a
VisualStyleElement that represents the sizing template of the bottom border of a window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the bottom border of a window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.FrameBottomSizingTemplate.
Normal VisualStyleElement.Window.FrameBottomSizing
Template.Normal
I n this Article
Gets a visual style element that represents the sizing template of the bottom border of a window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the bottom border of a window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameBottomSizingTemplate1 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementWindowFrameBottomSizingTemplate1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameBottomSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameBottomSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameBottomSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameLeft VisualStyle
Element.Window.FrameLeft Class
Provides VisualStyleElement objects for each state of the left border of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.FrameLeft
type VisualStyleElement.Window.FrameLeft = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.FrameLeft class returns a VisualStyleElement for a different state of
the left border of a window.

Properties
Active
Active

Gets a visual style element that represents the left border of an active window.

Inactive
Inactive

Gets a visual style element that represents the left border of an inactive window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.FrameLeft.Active VisualStyle
Element.Window.FrameLeft.Active
I n this Article
Gets a visual style element that represents the left border of an active window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left border of an active window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameLeft1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowFrameLeft1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameLeft.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameLeft.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameLeft.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameLeft.Inactive Visual
StyleElement.Window.FrameLeft.Inactive
I n this Article
Gets a visual style element that represents the left border of an inactive window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left border of an inactive window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameLeft2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowFrameLeft2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameLeft.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameLeft.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameLeft.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameLeftSizingTemplate
VisualStyleElement.Window.FrameLeftSizingTemplate
Class
Provides a VisualStyleElement that represents the sizing template of the left border of a window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.FrameLeftSizingTemplate
type VisualStyleElement.Window.FrameLeftSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.FrameLeftSizingTemplate class returns a VisualStyleElement
that represents the sizing template of the left border of a window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the left border of a window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.FrameLeftSizingTemplate.
Normal VisualStyleElement.Window.FrameLeftSizing
Template.Normal
I n this Article
Gets a visual style element that represents the sizing template of the left border of a window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the left border of a window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameLeftSizingTemplate1 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementWindowFrameLeftSizingTemplate1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameLeftSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameLeftSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameLeftSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameRight VisualStyle
Element.Window.FrameRight Class
Provides VisualStyleElement objects for each state of the right border of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.FrameRight
type VisualStyleElement.Window.FrameRight = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.FrameRight class returns a VisualStyleElement for a different state of
the right border of a window.

Properties
Active
Active

Gets a visual style element that represents the right border of an active window.

Inactive
Inactive

Gets a visual style element that represents the right border of an inactive window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.FrameRight.Active Visual
StyleElement.Window.FrameRight.Active
I n this Article
Gets a visual style element that represents the right border of an active window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right border of an active window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameRight1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowFrameRight1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameRight.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameRight.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameRight.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameRight.Inactive Visual
StyleElement.Window.FrameRight.Inactive
I n this Article
Gets a visual style element that represents the right border of an inactive window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right border of an inactive window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameRight2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowFrameRight2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameRight.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameRight.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameRight.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.FrameRightSizingTemplate
VisualStyleElement.Window.FrameRightSizingTemplate
Class
Provides a VisualStyleElement that represents the sizing template of the right border of a window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.FrameRightSizingTemplate
type VisualStyleElement.Window.FrameRightSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.FrameRightSizingTemplate class returns a
VisualStyleElement that represents the sizing template of the right border of a window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the right border of a window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.FrameRightSizingTemplate.
Normal VisualStyleElement.Window.FrameRightSizing
Template.Normal
I n this Article
Gets a visual style element that represents the sizing template of the right border of a window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the right border of a window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowFrameRightSizingTemplate1 method from the Paint event-handling method, passing
e as PaintEventArgs.

public void DrawVisualStyleElementWindowFrameRightSizingTemplate1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.FrameRightSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.FrameRightSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.FrameRightSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.HelpButton VisualStyle
Element.Window.HelpButton Class
Provides VisualStyleElement objects for each state of the Help button of a window or dialog box. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.HelpButton
type VisualStyleElement.Window.HelpButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.HelpButton class returns a VisualStyleElement for a different state of
the Help button of a window or dialog box.

Properties
Disabled
Disabled

Gets a visual style element that represents a Help button in the disabled state.

Hot
Hot

Gets a visual style element that represents a Help button in the hot state.

Normal
Normal

Gets a visual style element that represents a Help button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a Help button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.HelpButton.Disabled Visual
StyleElement.Window.HelpButton.Disabled
I n this Article
Gets a visual style element that represents a Help button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Help button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHelpButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHelpButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HelpButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HelpButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HelpButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.HelpButton.Hot VisualStyle
Element.Window.HelpButton.Hot
I n this Article
Gets a visual style element that represents a Help button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Help button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHelpButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHelpButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HelpButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HelpButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HelpButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.HelpButton.Normal Visual
StyleElement.Window.HelpButton.Normal
I n this Article
Gets a visual style element that represents a Help button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Help button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHelpButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHelpButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HelpButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HelpButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HelpButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.HelpButton.Pressed Visual
StyleElement.Window.HelpButton.Pressed
I n this Article
Gets a visual style element that represents a Help button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Help button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHelpButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHelpButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HelpButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HelpButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HelpButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalScroll VisualStyle
Element.Window.HorizontalScroll Class
Provides VisualStyleElement objects for each state of the horizontal scroll bar of a window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.HorizontalScroll
type VisualStyleElement.Window.HorizontalScroll = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.HorizontalScroll class returns a VisualStyleElement for a different
state of the horizontal scroll bar of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a horizontal scroll bar in the disabled state.

Hot
Hot

Gets a visual style element that represents a horizontal scroll bar in the hot state.

Normal
Normal

Gets a visual style element that represents a horizontal scroll bar in the normal state.

Pressed
Pressed

Gets a visual style element that represents a horizontal scroll bar in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.HorizontalScroll.Disabled
VisualStyleElement.Window.HorizontalScroll.Disabled
I n this Article
Gets a visual style element that represents a horizontal scroll bar in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll bar in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalScroll4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalScroll4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalScroll.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalScroll.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalScroll.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalScroll.Hot Visual
StyleElement.Window.HorizontalScroll.Hot
I n this Article
Gets a visual style element that represents a horizontal scroll bar in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll bar in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalScroll2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalScroll2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalScroll.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalScroll.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalScroll.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalScroll.Normal
VisualStyleElement.Window.HorizontalScroll.Normal
I n this Article
Gets a visual style element that represents a horizontal scroll bar in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll bar in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalScroll1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalScroll1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalScroll.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalScroll.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalScroll.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalScroll.Pressed
VisualStyleElement.Window.HorizontalScroll.Pressed
I n this Article
Gets a visual style element that represents a horizontal scroll bar in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll bar in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalScroll3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalScroll3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalScroll.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalScroll.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalScroll.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalThumb VisualStyle
Element.Window.HorizontalThumb Class
Provides VisualStyleElement objects for each state of the horizontal scroll box (also known as the thumb) of a window.
This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.HorizontalThumb
type VisualStyleElement.Window.HorizontalThumb = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.HorizontalThumb class returns a VisualStyleElement for a different
state of the horizontal scroll box of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a horizontal scroll box in the disabled state.

Hot
Hot

Gets a visual style element that represents a horizontal scroll box in the hot state.

Normal
Normal

Gets a visual style element that represents a horizontal scroll box in the normal state.

Pressed
Pressed

Gets a visual style element that represents a horizontal scroll box in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.HorizontalThumb.Disabled
VisualStyleElement.Window.HorizontalThumb.Disabled
I n this Article
Gets a visual style element that represents a horizontal scroll box in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalThumb4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalThumb4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalThumb.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalThumb.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalThumb.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalThumb.Hot Visual
StyleElement.Window.HorizontalThumb.Hot
I n this Article
Gets a visual style element that represents a horizontal scroll box in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalThumb2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalThumb2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalThumb.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalThumb.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalThumb.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalThumb.Normal
VisualStyleElement.Window.HorizontalThumb.Normal
I n this Article
Gets a visual style element that represents a horizontal scroll box in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalThumb1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalThumb1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalThumb.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalThumb.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalThumb.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.HorizontalThumb.Pressed
VisualStyleElement.Window.HorizontalThumb.Pressed
I n this Article
Gets a visual style element that represents a horizontal scroll box in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a horizontal scroll box in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowHorizontalThumb3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowHorizontalThumb3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.HorizontalThumb.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.HorizontalThumb.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.HorizontalThumb.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MaxButton VisualStyle
Element.Window.MaxButton Class
Provides VisualStyleElement objects for each state of the Maximize button of a window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.MaxButton
type VisualStyleElement.Window.MaxButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MaxButton class returns a VisualStyleElement for a different state of
the Maximize button of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a Maximize button in the disabled state.

Hot
Hot

Gets a visual style element that represents a Maximize button in the hot state.

Normal
Normal

Gets a visual style element that represents a Maximize button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a Maximize button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MaxButton.Disabled Visual
StyleElement.Window.MaxButton.Disabled
I n this Article
Gets a visual style element that represents a Maximize button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Maximize button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMaxButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMaxButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MaxButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MaxButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MaxButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MaxButton.Hot VisualStyle
Element.Window.MaxButton.Hot
I n this Article
Gets a visual style element that represents a Maximize button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Maximize button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMaxButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMaxButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MaxButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MaxButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MaxButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.MaxButton.Normal Visual
StyleElement.Window.MaxButton.Normal
I n this Article
Gets a visual style element that represents a Maximize button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Maximize button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMaxButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMaxButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MaxButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MaxButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MaxButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.MaxButton.Pressed Visual
StyleElement.Window.MaxButton.Pressed
I n this Article
Gets a visual style element that represents a Maximize button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Maximize button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMaxButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMaxButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MaxButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MaxButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MaxButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MaxCaption VisualStyle
Element.Window.MaxCaption Class
Provides VisualStyleElement objects for each state of the title bar of a maximized window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.MaxCaption
type VisualStyleElement.Window.MaxCaption = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MaxCaption class returns a VisualStyleElement for a different state
of the title bar of a maximized window.

Properties
Active
Active

Gets a visual style element that represents the title bar of a maximized active window.

Disabled
Disabled

Gets a visual style element that represents the title bar of a maximized disabled window.

Inactive
Inactive

Gets a visual style element that represents the title bar of a maximized inactive window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MaxCaption.Active Visual
StyleElement.Window.MaxCaption.Active
I n this Article
Gets a visual style element that represents the title bar of a maximized active window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a maximized active window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMaxCaption1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMaxCaption1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MaxCaption.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MaxCaption.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MaxCaption.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.MaxCaption.Disabled Visual
StyleElement.Window.MaxCaption.Disabled
I n this Article
Gets a visual style element that represents the title bar of a maximized disabled window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a maximized disabled window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMaxCaption3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMaxCaption3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MaxCaption.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MaxCaption.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MaxCaption.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MaxCaption.Inactive Visual
StyleElement.Window.MaxCaption.Inactive
I n this Article
Gets a visual style element that represents the title bar of a maximized inactive window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a maximized inactive window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMaxCaption2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMaxCaption2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MaxCaption.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MaxCaption.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MaxCaption.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiCloseButton VisualStyle
Element.Window.MdiCloseButton Class
Provides VisualStyleElement objects for each state of the Close button of a multiple-document interface (MDI) child
window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.MdiCloseButton
type VisualStyleElement.Window.MdiCloseButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MdiCloseButton class returns a VisualStyleElement for a different
state of the Close button of an MDI child window.

Properties
Disabled
Disabled

Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window
in the disabled state.

Hot
Hot

Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window
in the hot state.

Normal
Normal

Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window
in the normal state.

Pressed
Pressed

Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window
in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MdiCloseButton.Disabled
VisualStyleElement.Window.MdiCloseButton.Disabled
I n this Article
Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window in
the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Close button of an MDI child window in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiCloseButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiCloseButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiCloseButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiCloseButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiCloseButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiCloseButton.Hot Visual
StyleElement.Window.MdiCloseButton.Hot
I n this Article
Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window in
the hot state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Close button of an MDI child window in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiCloseButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiCloseButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiCloseButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiCloseButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiCloseButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiCloseButton.Normal
VisualStyleElement.Window.MdiCloseButton.Normal
I n this Article
Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window in
the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Close button of an MDI child window in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiCloseButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiCloseButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiCloseButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiCloseButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiCloseButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiCloseButton.Pressed
VisualStyleElement.Window.MdiCloseButton.Pressed
I n this Article
Gets a visual style element that represents the Close button of a multiple-document interface (MDI) child window in
the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Close button of an MDI child window in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiCloseButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiCloseButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiCloseButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiCloseButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiCloseButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiHelpButton VisualStyle
Element.Window.MdiHelpButton Class
Provides VisualStyleElement objects for each state of the Help button of a multiple-document interface (MDI) child
window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.MdiHelpButton
type VisualStyleElement.Window.MdiHelpButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MdiHelpButton class returns a VisualStyleElement for a different
state of the Help button of an MDI child window.

Properties
Disabled
Disabled

Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window
in the disabled state.

Hot
Hot

Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window
in the hot state.

Normal
Normal

Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window
in the normal state.

Pressed
Pressed

Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window
in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MdiHelpButton.Disabled
VisualStyleElement.Window.MdiHelpButton.Disabled
I n this Article
Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window in
the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Help button of an MDI child window in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiHelpButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiHelpButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiHelpButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiHelpButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiHelpButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiHelpButton.Hot Visual
StyleElement.Window.MdiHelpButton.Hot
I n this Article
Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window in
the hot state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Help button of an MDI child window in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiHelpButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiHelpButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiHelpButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiHelpButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiHelpButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiHelpButton.Normal
VisualStyleElement.Window.MdiHelpButton.Normal
I n this Article
Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window in
the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Help button of an MDI child window in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiHelpButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiHelpButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiHelpButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiHelpButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiHelpButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiHelpButton.Pressed
VisualStyleElement.Window.MdiHelpButton.Pressed
I n this Article
Gets a visual style element that represents the Help button of a multiple-document interface (MDI) child window in
the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Help button of an MDI child window in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiHelpButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiHelpButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiHelpButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiHelpButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiHelpButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiMinButton VisualStyle
Element.Window.MdiMinButton Class
Provides VisualStyleElement objects for each state of the Minimize button of a multiple-document interface (MDI)
child window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.MdiMinButton
type VisualStyleElement.Window.MdiMinButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MdiMinButton class returns a VisualStyleElement for a different
state of the Minimize button of an MDI child window.

Properties
Disabled
Disabled

Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child
window in the disabled state.

Hot
Hot

Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child
window in the hot state.

Normal
Normal

Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child
window in the normal state.

Pressed
Pressed

Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child
window in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MdiMinButton.Disabled
VisualStyleElement.Window.MdiMinButton.Disabled
I n this Article
Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child window
in the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Minimize button of an MDI child window in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiMinButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiMinButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiMinButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiMinButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiMinButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiMinButton.Hot Visual
StyleElement.Window.MdiMinButton.Hot
I n this Article
Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child window
in the hot state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Minimize button of an MDI child window in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiMinButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiMinButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiMinButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiMinButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiMinButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiMinButton.Normal Visual
StyleElement.Window.MdiMinButton.Normal
I n this Article
Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child window
in the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Minimize button of an MDI child window in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiMinButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiMinButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiMinButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiMinButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiMinButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiMinButton.Pressed Visual
StyleElement.Window.MdiMinButton.Pressed
I n this Article
Gets a visual style element that represents the Minimize button of a multiple-document interface (MDI) child window
in the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Minimize button of an MDI child window in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiMinButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiMinButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiMinButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiMinButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiMinButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiRestoreButton Visual
StyleElement.Window.MdiRestoreButton Class
Provides VisualStyleElement objects for each state of the Restore button of a multiple-document interface (MDI) child
window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.MdiRestoreButton
type VisualStyleElement.Window.MdiRestoreButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MdiRestoreButton class returns a VisualStyleElement for a different
state of the Restore button of an MDI child window.

Properties
Disabled
Disabled

Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child
window in the disabled state.

Hot
Hot

Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child
window in the hot state.

Normal
Normal

Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child
window in the normal state.

Pressed
Pressed

Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child
window in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MdiRestoreButton.Disabled
VisualStyleElement.Window.MdiRestoreButton.Disabled
I n this Article
Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child window in
the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Restore button of an MDI child window in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiRestoreButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiRestoreButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiRestoreButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiRestoreButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiRestoreButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiRestoreButton.Hot Visual
StyleElement.Window.MdiRestoreButton.Hot
I n this Article
Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child window in
the hot state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Restore button of an MDI child window in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiRestoreButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiRestoreButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiRestoreButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiRestoreButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiRestoreButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiRestoreButton.Normal
VisualStyleElement.Window.MdiRestoreButton.Normal
I n this Article
Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child window in
the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Restore button of an MDI child window in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiRestoreButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiRestoreButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiRestoreButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiRestoreButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiRestoreButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiRestoreButton.Pressed
VisualStyleElement.Window.MdiRestoreButton.Pressed
I n this Article
Gets a visual style element that represents the Restore button of a multiple-document interface (MDI) child window in
the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the Restore button of an MDI child window in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiRestoreButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiRestoreButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiRestoreButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiRestoreButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiRestoreButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiSysButton VisualStyle
Element.Window.MdiSysButton Class
Provides VisualStyleElement objects for each state of the System button of a multiple-document interface (MDI) child
window with visual styles. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.MdiSysButton
type VisualStyleElement.Window.MdiSysButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MdiSysButton class gets a VisualStyleElement for a different state of
the System button of an MDI child window. This button opens the Window menu (also known as the System menu
or Control menu) when it is clicked.

Properties
Disabled
Disabled

Gets a visual style element that represents the System button of a multiple-document interface (MDI) child
window in the disabled state.

Hot
Hot

Gets a visual style element that represents the System button of a multiple-document interface (MDI) child
window in the hot state.

Normal
Normal

Gets a visual style element that represents the System button of a multiple-document interface (MDI) child
window in the normal state.

Pressed
Pressed

Gets a visual style element that represents the System button of a multiple-document interface (MDI) child
window in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MdiSysButton.Disabled
VisualStyleElement.Window.MdiSysButton.Disabled
I n this Article
Gets a visual style element that represents the System button of a multiple-document interface (MDI) child window in
the disabled state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }
member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the System button of an MDI child window in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiSysButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiSysButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiSysButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiSysButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiSysButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiSysButton.Hot Visual
StyleElement.Window.MdiSysButton.Hot
I n this Article
Gets a visual style element that represents the System button of a multiple-document interface (MDI) child window in
the hot state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }
member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the System button of an MDI child window in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiSysButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiSysButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiSysButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiSysButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiSysButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiSysButton.Normal Visual
StyleElement.Window.MdiSysButton.Normal
I n this Article
Gets a visual style element that represents the System button of a multiple-document interface (MDI) child window in
the normal state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the System button of an MDI child window in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiSysButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiSysButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiSysButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiSysButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiSysButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.MdiSysButton.Pressed Visual
StyleElement.Window.MdiSysButton.Pressed
I n this Article
Gets a visual style element that represents the System button of a multiple-document interface (MDI) child window in
the pressed state.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the System button of an MDI child window in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMdiSysButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMdiSysButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MdiSysButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MdiSysButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MdiSysButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MinButton VisualStyle
Element.Window.MinButton Class
Provides VisualStyleElement objects for each state of the Minimize button of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.MinButton
type VisualStyleElement.Window.MinButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MinButton class returns a VisualStyleElement for a different state of
the Minimize button of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a Minimize button in the disabled state.

Hot
Hot

Gets a visual style element that represents a Minimize button in the hot state.

Normal
Normal

Gets a visual style element that represents a Minimize button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a Minimize button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MinButton.Disabled Visual
StyleElement.Window.MinButton.Disabled
I n this Article
Gets a visual style element that represents a Minimize button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Minimize button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMinButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMinButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MinButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MinButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MinButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MinButton.Hot VisualStyle
Element.Window.MinButton.Hot
I n this Article
Gets a visual style element that represents a Minimize button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Minimize button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMinButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMinButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MinButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MinButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MinButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.MinButton.Normal Visual
StyleElement.Window.MinButton.Normal
I n this Article
Gets a visual style element that represents a Minimize button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Minimize button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMinButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMinButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MinButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MinButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MinButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.MinButton.Pressed Visual
StyleElement.Window.MinButton.Pressed
I n this Article
Gets a visual style element that represents a Minimize button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Minimize button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMinButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMinButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MinButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MinButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MinButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.MinCaption VisualStyle
Element.Window.MinCaption Class
Provides VisualStyleElement objects for each state of the title bar of a minimized window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.MinCaption
type VisualStyleElement.Window.MinCaption = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.MinCaption class returns a VisualStyleElement for a different state of
the title bar of a minimized window.

Properties
Active
Active

Gets a visual style element that represents the title bar of a minimized active window.

Disabled
Disabled

Gets a visual style element that represents the title bar of a minimized disabled window.

Inactive
Inactive

Gets a visual style element that represents the title bar of a minimized inactive window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.MinCaption.Active Visual
StyleElement.Window.MinCaption.Active
I n this Article
Gets a visual style element that represents the title bar of a minimized active window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a minimized active window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMinCaption1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMinCaption1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MinCaption.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MinCaption.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MinCaption.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.MinCaption.Disabled Visual
StyleElement.Window.MinCaption.Disabled
I n this Article
Gets a visual style element that represents the title bar of a minimized disabled window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a minimized disabled window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMinCaption3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMinCaption3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MinCaption.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MinCaption.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MinCaption.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.MinCaption.Inactive Visual
StyleElement.Window.MinCaption.Inactive
I n this Article
Gets a visual style element that represents the title bar of a minimized inactive window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a minimized inactive window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowMinCaption2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowMinCaption2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.MinCaption.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.MinCaption.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.MinCaption.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.RestoreButton VisualStyle
Element.Window.RestoreButton Class
Provides VisualStyleElement objects for each state of the Restore button of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.RestoreButton
type VisualStyleElement.Window.RestoreButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.RestoreButton class returns a VisualStyleElement for a different state
of the Restore button of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a Restore button in the disabled state.

Hot
Hot

Gets a visual style element that represents a Restore button in the hot state.

Normal
Normal

Gets a visual style element that represents a Restore button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a Restore button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.RestoreButton.Disabled
VisualStyleElement.Window.RestoreButton.Disabled
I n this Article
Gets a visual style element that represents a Restore button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Restore button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowRestoreButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowRestoreButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.RestoreButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.RestoreButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.RestoreButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.RestoreButton.Hot Visual
StyleElement.Window.RestoreButton.Hot
I n this Article
Gets a visual style element that represents a Restore button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Restore button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowRestoreButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowRestoreButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.RestoreButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.RestoreButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.RestoreButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.RestoreButton.Normal Visual
StyleElement.Window.RestoreButton.Normal
I n this Article
Gets a visual style element that represents a Restore button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Restore button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowRestoreButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowRestoreButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.RestoreButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.RestoreButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.RestoreButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.RestoreButton.Pressed Visual
StyleElement.Window.RestoreButton.Pressed
I n this Article
Gets a visual style element that represents a Restore button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a Restore button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowRestoreButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowRestoreButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.RestoreButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.RestoreButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.RestoreButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCaption VisualStyle
Element.Window.SmallCaption Class
Provides VisualStyleElement objects for each state of the title bar of a small window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.SmallCaption
type VisualStyleElement.Window.SmallCaption = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SmallCaption class returns a VisualStyleElement for a different state
of the title bar of a small window, such as a tool window.

Properties
Active
Active

Gets a visual style element that represents the title bar of an active small window.

Disabled
Disabled

Gets a visual style element that represents the title bar of a disabled small window.

Inactive
Inactive

Gets a visual style element that represents the title bar of an inactive small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallCaption.Active Visual
StyleElement.Window.SmallCaption.Active
I n this Article
Gets a visual style element that represents the title bar of an active small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an active small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCaption1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallCaption1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCaption.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCaption.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCaption.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCaption.Disabled Visual
StyleElement.Window.SmallCaption.Disabled
I n this Article
Gets a visual style element that represents the title bar of a disabled small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a disabled small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCaption3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallCaption3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCaption.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCaption.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCaption.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCaption.Inactive Visual
StyleElement.Window.SmallCaption.Inactive
I n this Article
Gets a visual style element that represents the title bar of an inactive small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an inactive small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCaption2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallCaption2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCaption.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCaption.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCaption.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCaptionSizingTemplate
VisualStyleElement.Window.SmallCaptionSizingTemplate
Class
Provides a VisualStyleElement that represents the sizing template of the title bar of a small window. This class cannot
be inherited.

D eclaration
public static class VisualStyleElement.Window.SmallCaptionSizingTemplate
type VisualStyleElement.Window.SmallCaptionSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.SmallCaptionSizingTemplate class returns a
VisualStyleElement that represents the sizing template of the title bar of a small window, such as a tool window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the title bar of a small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallCaptionSizingTemplate.
Normal VisualStyleElement.Window.SmallCaptionSizing
Template.Normal
I n this Article
Gets a visual style element that represents the sizing template of the title bar of a small window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the title bar of a small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCaptionSizingTemplate1 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementWindowSmallCaptionSizingTemplate1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCaptionSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCaptionSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCaptionSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCloseButton VisualStyle
Element.Window.SmallCloseButton Class
Provides VisualStyleElement objects for each state of the Close button of a small window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.SmallCloseButton
type VisualStyleElement.Window.SmallCloseButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SmallCloseButton class returns a VisualStyleElement for a different
state of the Close button of a small window, such as a tool window.

Properties
Disabled
Disabled

Gets a visual style element that represents the small Close button in the disabled state.

Hot
Hot

Gets a visual style element that represents the small Close button in the hot state.

Normal
Normal

Gets a visual style element that represents the small Close button in the normal state.

Pressed
Pressed

Gets a visual style element that represents the small Close button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallCloseButton.Disabled
VisualStyleElement.Window.SmallCloseButton.Disabled
I n this Article
Gets a visual style element that represents the small Close button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the small Close button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCloseButton4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallCloseButton4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCloseButton.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCloseButton.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCloseButton.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCloseButton.Hot Visual
StyleElement.Window.SmallCloseButton.Hot
I n this Article
Gets a visual style element that represents the small Close button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the small Close button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCloseButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallCloseButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCloseButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCloseButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCloseButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCloseButton.Normal
VisualStyleElement.Window.SmallCloseButton.Normal
I n this Article
Gets a visual style element that represents the small Close button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the small Close button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCloseButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallCloseButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCloseButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCloseButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCloseButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallCloseButton.Pressed
VisualStyleElement.Window.SmallCloseButton.Pressed
I n this Article
Gets a visual style element that represents the small Close button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the small Close button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallCloseButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallCloseButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallCloseButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallCloseButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallCloseButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameBottom Visual
StyleElement.Window.SmallFrameBottom Class
Provides VisualStyleElement objects for each state of the bottom border of a small window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.SmallFrameBottom
type VisualStyleElement.Window.SmallFrameBottom = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SmallFrameBottom class gets a VisualStyleElement for a different
state of the bottom border of a small window, such as a tool window.

Properties
Active
Active

Gets a visual style element that represents the bottom border of an active small window.

Inactive
Inactive

Gets a visual style element that represents the bottom border of an inactive small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallFrameBottom.Active
VisualStyleElement.Window.SmallFrameBottom.Active
I n this Article
Gets a visual style element that represents the bottom border of an active small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the bottom border of an active small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameBottom1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallFrameBottom1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameBottom.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallFrameBottom.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameBottom.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameBottom.Inactive
VisualStyleElement.Window.SmallFrameBottom.Inactive
I n this Article
Gets a visual style element that represents the bottom border of an inactive small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the bottom border of an inactive small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameBottom1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallFrameBottom2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameBottom.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallFrameBottom.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameBottom.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameBottomSizing
Template VisualStyleElement.Window.SmallFrameBottom
SizingTemplate Class
Provides a VisualStyleElement that represents the sizing template of the bottom border of a small window. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.SmallFrameBottomSizingTemplate
type VisualStyleElement.Window.SmallFrameBottomSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.SmallFrameBottomSizingTemplate class returns a
VisualStyleElement that represents the sizing template of the bottom border of a small window, such as a tool window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the bottom border of a small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallFrameBottomSizing
Template.Normal VisualStyleElement.Window.Small
FrameBottomSizingTemplate.Normal
I n this Article
Gets a visual style element that represents the sizing template of the bottom border of a small window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the bottom border of a small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameBottomSizingTemplate1 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementWindowSmallFrameBottomSizingTemplate1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameBottomSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new
VisualStyleRenderer(VisualStyleElement.Window.SmallFrameBottomSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameBottomSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameLeft VisualStyle
Element.Window.SmallFrameLeft Class
Provides VisualStyleElement objects for each state of the left border of a small window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.SmallFrameLeft
type VisualStyleElement.Window.SmallFrameLeft = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SmallFrameLeft class returns a VisualStyleElement for a different
state of the left border of a small window, such as a tool window.

Properties
Active
Active

Gets a visual style element that represents the left border of an active small window.

Inactive
Inactive

Gets a visual style element that represents the left border of an inactive small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallFrameLeft.Active Visual
StyleElement.Window.SmallFrameLeft.Active
I n this Article
Gets a visual style element that represents the left border of an active small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left border of an active small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameLeft1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallFrameLeft1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameLeft.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallFrameLeft.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameLeft.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameLeft.Inactive
VisualStyleElement.Window.SmallFrameLeft.Inactive
I n this Article
Gets a visual style element that represents the left border of an inactive small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the left border of an inactive small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameLeft2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallFrameLeft2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameLeft.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallFrameLeft.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameLeft.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameLeftSizing
Template VisualStyleElement.Window.SmallFrameLeft
SizingTemplate Class
Provides a VisualStyleElement that represents the sizing template of the left border of a small window. This class
cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.SmallFrameLeftSizingTemplate
type VisualStyleElement.Window.SmallFrameLeftSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.SmallFrameLeftSizingTemplate class returns a
VisualStyleElement that represents the sizing template of the left border of a small window, such as a tool window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the left border of a small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallFrameLeftSizing
Template.Normal VisualStyleElement.Window.Small
FrameLeftSizingTemplate.Normal
I n this Article
Gets a visual style element that represents the sizing template of the left border of a small window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the left border of a small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameLeftSizingTemplate1 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementWindowSmallFrameLeftSizingTemplate1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameLeftSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallFrameLeftSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameLeftSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameRight VisualStyle
Element.Window.SmallFrameRight Class
Provides VisualStyleElement objects for each state of the right border of a small window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.SmallFrameRight
type VisualStyleElement.Window.SmallFrameRight = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SmallFrameRight class returns a VisualStyleElement for a different
state of the right border of a small window, such as a tool window.

Properties
Active
Active

Gets a visual style element that represents the right border of an active small window.

Inactive
Inactive

Gets a visual style element that represents the right border of an inactive small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallFrameRight.Active
VisualStyleElement.Window.SmallFrameRight.Active
I n this Article
Gets a visual style element that represents the right border of an active small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right border of an active small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameRight1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallFrameRight1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameRight.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallFrameRight.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameRight.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameRight.Inactive
VisualStyleElement.Window.SmallFrameRight.Inactive
I n this Article
Gets a visual style element that represents the right border of an inactive small window.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the right border of an inactive small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameRight2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallFrameRight2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameRight.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallFrameRight.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameRight.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallFrameRightSizing
Template VisualStyleElement.Window.SmallFrameRight
SizingTemplate Class
Provides a VisualStyleElement for the sizing template of the right border of a small window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.SmallFrameRightSizingTemplate
type VisualStyleElement.Window.SmallFrameRightSizingTemplate = class

I nheritance H ierarchy
Object Object

Remarks
The Normal property of the VisualStyleElement.Window.SmallFrameRightSizingTemplate class returns a
VisualStyleElement that represents the sizing template of the right border of a small window, such as a tool window.

Properties
Normal
Normal

Gets a visual style element that represents the sizing template of the right border of a small window.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallFrameRightSizing
Template.Normal VisualStyleElement.Window.Small
FrameRightSizingTemplate.Normal
I n this Article
Gets a visual style element that represents the sizing template of the right border of a small window.
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the sizing template of the right border of a small window.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallFrameRightSizingTemplate1 method from the Paint event-handling method,
passing e as PaintEventArgs.

public void DrawVisualStyleElementWindowSmallFrameRightSizingTemplate1(PaintEventArgs e)


{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallFrameRightSizingTemplate.Normal))
{
VisualStyleRenderer renderer =
new
VisualStyleRenderer(VisualStyleElement.Window.SmallFrameRightSizingTemplate.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallFrameRightSizingTemplate.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallMaxCaption VisualStyle
Element.Window.SmallMaxCaption Class
Provides VisualStyleElement objects for each state of the title bar of a maximized small window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.SmallMaxCaption
type VisualStyleElement.Window.SmallMaxCaption = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SmallMaxCaption class returns a VisualStyleElement for a different
state of the title bar of a maximized small window, such as a tool window.

Properties
Active
Active

Gets a visual style element that represents the title bar of an active small window that is maximized.

Disabled
Disabled

Gets a visual style element that represents the title bar of a disabled small window that is maximized.

Inactive
Inactive

Gets a visual style element that represents the title bar of an inactive small window that is maximized.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallMaxCaption.Active
VisualStyleElement.Window.SmallMaxCaption.Active
I n this Article
Gets a visual style element that represents the title bar of an active small window that is maximized.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an active small window that is maximized.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallMaxCaption1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallMaxCaption1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallMaxCaption.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallMaxCaption.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallMaxCaption.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallMaxCaption.Disabled
VisualStyleElement.Window.SmallMaxCaption.Disabled
I n this Article
Gets a visual style element that represents the title bar of a disabled small window that is maximized.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a disabled small window that is maximized.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallMaxCaption3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallMaxCaption3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallMaxCaption.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallMaxCaption.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallMaxCaption.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallMaxCaption.Inactive
VisualStyleElement.Window.SmallMaxCaption.Inactive
I n this Article
Gets a visual style element that represents the title bar of an inactive small window that is maximized.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an inactive small window that is maximized.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallMaxCaption2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallMaxCaption2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallMaxCaption.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallMaxCaption.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallMaxCaption.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallMinCaption VisualStyle
Element.Window.SmallMinCaption Class
Provides VisualStyleElement objects for each state of the title bar of a minimized small window. This class cannot be
inherited.

D eclaration
public static class VisualStyleElement.Window.SmallMinCaption
type VisualStyleElement.Window.SmallMinCaption = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SmallMinCaption class returns a VisualStyleElement for a different
state of the title bar of a minimized small window, such as a tool window.

Properties
Active
Active

Gets a visual style element that represents the title bar of an active small window that is minimized.

Disabled
Disabled

Gets a visual style element that represents the title bar of a disabled small window that is minimized.

Inactive
Inactive

Gets a visual style element that represents the title bar of an inactive small window that is minimized.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SmallMinCaption.Active
VisualStyleElement.Window.SmallMinCaption.Active
I n this Article
Gets a visual style element that represents the title bar of an active small window that is minimized.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Active { get; }


member this.Active : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an active small window that is minimized.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Active property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallMinCaption1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallMinCaption1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallMinCaption.Active))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallMinCaption.Active);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallMinCaption.Active",
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));
}

Remarks
You can use the VisualStyleElement returned by the Active property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallMinCaption.Disabled
VisualStyleElement.Window.SmallMinCaption.Disabled
I n this Article
Gets a visual style element that represents the title bar of a disabled small window that is minimized.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of a disabled small window that is minimized.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallMinCaption3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallMinCaption3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallMinCaption.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallMinCaption.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallMinCaption.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.SmallMinCaption.Inactive
VisualStyleElement.Window.SmallMinCaption.Inactive
I n this Article
Gets a visual style element that represents the title bar of an inactive small window that is minimized.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }


member this.Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents the title bar of an inactive small window that is minimized.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Inactive property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSmallMinCaption2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSmallMinCaption2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SmallMinCaption.Inactive))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SmallMinCaption.Inactive);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SmallMinCaption.Inactive",
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));
}

Remarks
You can use the VisualStyleElement returned by the Inactive property to create a VisualStyleRenderer.
VisualStyleElement.Window.SysButton VisualStyle
Element.Window.SysButton Class
Provides VisualStyleElement objects for each state of the System button of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.SysButton
type VisualStyleElement.Window.SysButton = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.SysButton class returns a VisualStyleElement for a different state of
the System button. This button opens the Window menu (also known as the System menu or Control menu) when it
is clicked.

Properties
Disabled
Disabled

Gets a visual style element that represents a System button in the disabled state.

Hot
Hot

Gets a visual style element that represents a System button in the hot state.

Normal
Normal

Gets a visual style element that represents a System button in the normal state.

Pressed
Pressed

Gets a visual style element that represents a System button in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.SysButton.Disabled Visual
StyleElement.Window.SysButton.Disabled
I n this Article
Gets a visual style element that represents a System button in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a System button in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElement_Button_PushButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElement_Button_PushButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.PushButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.PushButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.SysButton.Hot VisualStyle
Element.Window.SysButton.Hot
I n this Article
Gets a visual style element that represents a System button in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a System button in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSysButton2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSysButton2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SysButton.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SysButton.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SysButton.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.SysButton.Normal Visual
StyleElement.Window.SysButton.Normal
I n this Article
Gets a visual style element that represents a System button in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a System button in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSysButton1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSysButton1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SysButton.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SysButton.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SysButton.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.SysButton.Pressed Visual
StyleElement.Window.SysButton.Pressed
I n this Article
Gets a visual style element that represents a System button in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a System button in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowSysButton3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowSysButton3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.SysButton.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.SysButton.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.SysButton.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalScroll VisualStyle
Element.Window.VerticalScroll Class
Provides VisualStyleElement objects for each state of the vertical scroll bar of a window. This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.VerticalScroll
type VisualStyleElement.Window.VerticalScroll = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.VerticalScroll class returns a VisualStyleElement for a different state
of the vertical scroll bar of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a vertical scroll bar in the disabled state.

Hot
Hot

Gets a visual style element that represents a vertical scroll bar in the hot state.

Normal
Normal

Gets a visual style element that represents a vertical scroll bar in the normal state.

Pressed
Pressed

Gets a visual style element that represents a vertical scroll bar in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.VerticalScroll.Disabled Visual
StyleElement.Window.VerticalScroll.Disabled
I n this Article
Gets a visual style element that represents a vertical scroll bar in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll bar in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalScroll4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalScroll4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalScroll.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalScroll.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalScroll.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalScroll.Hot VisualStyle
Element.Window.VerticalScroll.Hot
I n this Article
Gets a visual style element that represents a vertical scroll bar in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll bar in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalScroll2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalScroll2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalScroll.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalScroll.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalScroll.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalScroll.Normal Visual
StyleElement.Window.VerticalScroll.Normal
I n this Article
Gets a visual style element that represents a vertical scroll bar in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll bar in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalScroll1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalScroll1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalScroll.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalScroll.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalScroll.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalScroll.Pressed Visual
StyleElement.Window.VerticalScroll.Pressed
I n this Article
Gets a visual style element that represents a vertical scroll bar in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll bar in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalScroll3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalScroll3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalScroll.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalScroll.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalScroll.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalThumb VisualStyle
Element.Window.VerticalThumb Class
Provides VisualStyleElement objects for each state of the vertical scroll box (also known as the thumb) of a window.
This class cannot be inherited.

D eclaration
public static class VisualStyleElement.Window.VerticalThumb
type VisualStyleElement.Window.VerticalThumb = class

I nheritance H ierarchy
Object Object

Remarks
Each property of the VisualStyleElement.Window.VerticalThumb class returns a VisualStyleElement for a different state
of the vertical scroll box of a window.

Properties
Disabled
Disabled

Gets a visual style element that represents a vertical scroll box in the disabled state.

Hot
Hot

Gets a visual style element that represents a vertical scroll box in the hot state.

Normal
Normal

Gets a visual style element that represents a vertical scroll box in the normal state.

Pressed
Pressed

Gets a visual style element that represents a vertical scroll box in the pressed state.

See Also
VisualStyleElement VisualStyleElement
VisualStyleElement.Window.VerticalThumb.Disabled
VisualStyleElement.Window.VerticalThumb.Disabled
I n this Article
Gets a visual style element that represents a vertical scroll box in the disabled state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Disabled { get; }


member this.Disabled : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the disabled state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Disabled property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalThumb4 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalThumb4(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalThumb.Disabled))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalThumb.Disabled);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalThumb.Disabled",
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));
}

Remarks
You can use the VisualStyleElement returned by the Disabled property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalThumb.Hot Visual
StyleElement.Window.VerticalThumb.Hot
I n this Article
Gets a visual style element that represents a vertical scroll box in the hot state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Hot { get; }


member this.Hot : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the hot state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Hot property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalThumb2 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalThumb2(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalThumb.Hot))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalThumb.Hot);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalThumb.Hot",
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));
}

Remarks
You can use the VisualStyleElement returned by the Hot property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalThumb.Normal Visual
StyleElement.Window.VerticalThumb.Normal
I n this Article
Gets a visual style element that represents a vertical scroll box in the normal state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }


member this.Normal : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the normal state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Normal property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalThumb1 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalThumb1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalThumb.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalThumb.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalThumb.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));
}

Remarks
You can use the VisualStyleElement returned by the Normal property to create a VisualStyleRenderer.
VisualStyleElement.Window.VerticalThumb.Pressed Visual
StyleElement.Window.VerticalThumb.Pressed
I n this Article
Gets a visual style element that represents a vertical scroll box in the pressed state.

public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }


member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement

Returns
VisualStyleElement VisualStyleElement
A VisualStyleElement that represents a vertical scroll box in the pressed state.

Examples
The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned
by the Pressed property. To run this example, paste it into a Windows Form. Handle the form's Paint event and call the
DrawVisualStyleElementWindowVerticalThumb3 method from the Paint event-handling method, passing e as
PaintEventArgs.
public void DrawVisualStyleElementWindowVerticalThumb3(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Window.VerticalThumb.Pressed))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.VerticalThumb.Pressed);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Window.VerticalThumb.Pressed",
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));
}

Remarks
You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.
VisualStyleInformation VisualStyleInformation Class
Provides information about the current visual style of the operating system.

D eclaration
public static class VisualStyleInformation
type VisualStyleInformation = class

I nheritance H ierarchy
Object Object

Remarks
This class exposes static properties that provide details about the current visual style of the operating system.

Properties
Author
Author

Gets the author of the current visual style.

ColorScheme
ColorScheme

Gets the color scheme of the current visual style.

Company
Company

Gets the company that created the current visual style.

ControlHighlightHot
ControlHighlightHot

Gets the color that the current visual style uses to indicate the hot state of a control.

Copyright
Copyright

Gets the copyright of the current visual style.

Description
Description

Gets a description of the current visual style.


DisplayName
DisplayName

Gets the display name of the current visual style.

IsEnabledByUser
IsEnabledByUser

Gets a value indicating whether the user has enabled visual styles in the operating system.

IsSupportedByOS
IsSupportedByOS

Gets a value indicating whether the operating system supports visual styles.

MinimumColorDepth
MinimumColorDepth

Gets the minimum color depth for the current visual style.

Size
Size

Gets a string that describes the size of the current visual style.

SupportsFlatMenus
SupportsFlatMenus

Gets a value indicating whether the current visual style supports flat menus.

TextControlBorder
TextControlBorder

Gets the color that the current visual style uses to paint the borders of controls that contain text.

Url
Url

Gets a URL provided by the author of the current visual style.

Version
Version

Gets the version of the current visual style.


VisualStyleInformation.Author VisualStyleInformation.
Author
I n this Article
Gets the author of the current visual style.

public static string Author { get; }


member this.Author : string

Returns
String String
A string that specifies the author of the current visual style if visual styles are enabled; otherwise, an empty string ("").

Remarks
This property checks the value of the IsEnabledByUser property internally.
VisualStyleInformation.ColorScheme VisualStyle
Information.ColorScheme
I n this Article
Gets the color scheme of the current visual style.

public static string ColorScheme { get; }


member this.ColorScheme : string

Returns
String String
A string that specifies the color scheme of the current visual style if visual styles are enabled; otherwise, an empty
string ("").

Remarks
The Windows XP visual style provides three color schemes. This property returns "NormalColor" if the blue color
scheme is active, "HomeStead" if the olive green color scheme is active, and "Metallic" if the silver color scheme is
active.
VisualStyleInformation.Company VisualStyleInformation.
Company
I n this Article
Gets the company that created the current visual style.

public static string Company { get; }


member this.Company : string

Returns
String String
A string that specifies the company that created the current visual style if visual styles are enabled; otherwise, an empty
string ("").

Remarks
This property checks the value of the IsEnabledByUser property internally.
VisualStyleInformation.ControlHighlightHot VisualStyle
Information.ControlHighlightHot
I n this Article
Gets the color that the current visual style uses to indicate the hot state of a control.

public static System.Drawing.Color ControlHighlightHot { get; }


member this.ControlHighlightHot : System.Drawing.Color

Returns
Color Color
If visual styles are enabled, the Color used to paint a highlight on a control in the hot state; otherwise, ButtonHighlight.

Remarks
This property checks the values of the IsEnabledByUser and VisualStyleRenderer.IsSupported properties internally.
VisualStyleInformation.Copyright VisualStyleInformation.
Copyright
I n this Article
Gets the copyright of the current visual style.

public static string Copyright { get; }


member this.Copyright : string

Returns
String String
A string that specifies the copyright of the current visual style if visual styles are enabled; otherwise, an empty string
("").

Remarks
This property checks the value of the IsEnabledByUser property internally.
VisualStyleInformation.Description VisualStyle
Information.Description
I n this Article
Gets a description of the current visual style.

public static string Description { get; }


member this.Description : string

Returns
String String
A string that describes the current visual style if visual styles are enabled; otherwise, an empty string ("").

Remarks
This property checks the value of the IsEnabledByUser property internally.
VisualStyleInformation.DisplayName VisualStyle
Information.DisplayName
I n this Article
Gets the display name of the current visual style.

public static string DisplayName { get; }


member this.DisplayName : string

Returns
String String
A string that specifies the display name of the current visual style if visual styles are enabled; otherwise, an empty
string ("").

Remarks
This property checks the value of the IsEnabledByUser property internally.
VisualStyleInformation.IsEnabledByUser VisualStyle
Information.IsEnabledByUser
I n this Article
Gets a value indicating whether the user has enabled visual styles in the operating system.

public static bool IsEnabledByUser { get; }


member this.IsEnabledByUser : bool

Returns
Boolean Boolean
true if the user has enabled visual styles in an operating system that supports them; otherwise, false .

Remarks
Users can enable visual styles in the Appearance tab of the Display option in Control Panel. This property checks the
value of the IsSupportedByOS property internally.
VisualStyleInformation.IsSupportedByOS VisualStyle
Information.IsSupportedByOS
I n this Article
Gets a value indicating whether the operating system supports visual styles.

public static bool IsSupportedByOS { get; }


member this.IsSupportedByOS : bool

Returns
Boolean Boolean
true if the operating system supports visual styles; otherwise, false .

Remarks
Visual styles are supported only on Windows XP Home Edition, Windows XP Professional, and Windows Server 2003.
VisualStyleInformation.MinimumColorDepth VisualStyle
Information.MinimumColorDepth
I n this Article
Gets the minimum color depth for the current visual style.

public static int MinimumColorDepth { get; }


member this.MinimumColorDepth : int

Returns
Int32 Int32
The minimum color depth for the current visual style if visual styles are enabled; otherwise, 0.

Remarks
This property checks the values of the IsEnabledByUser and VisualStyleRenderer.IsSupported properties internally.
VisualStyleInformation.Size VisualStyleInformation.Size
I n this Article
Gets a string that describes the size of the current visual style.
public static string Size { get; }
member this.Size : string

Returns
String String
A string that describes the size of the current visual style if visual styles are enabled; otherwise, an empty string ("").

Remarks
This property returns "NormalSize", "LargeFonts" or "ExtraLargeFonts". This property checks the value of the
IsEnabledByUser property internally.
VisualStyleInformation.SupportsFlatMenus VisualStyle
Information.SupportsFlatMenus
I n this Article
Gets a value indicating whether the current visual style supports flat menus.

public static bool SupportsFlatMenus { get; }


member this.SupportsFlatMenus : bool

Returns
Boolean Boolean
true if visual styles are enabled and the current visual style supports flat menus; otherwise, false .

Remarks
This property checks the values of the IsEnabledByUser and VisualStyleRenderer.IsSupported properties internally.
VisualStyleInformation.TextControlBorder VisualStyle
Information.TextControlBorder
I n this Article
Gets the color that the current visual style uses to paint the borders of controls that contain text.

public static System.Drawing.Color TextControlBorder { get; }


member this.TextControlBorder : System.Drawing.Color

Returns
Color Color
If visual styles are enabled, the Color that the current visual style uses to paint the borders of controls that contain text;
otherwise, ControlDarkDark.

Remarks
This property specifies the border color of controls such as TextBox and ComboBox. This property checks the values of
the IsEnabledByUser and VisualStyleRenderer.IsSupported properties internally.
VisualStyleInformation.Url VisualStyleInformation.Url
I n this Article
Gets a URL provided by the author of the current visual style.
public static string Url { get; }
member this.Url : string

Returns
String String
A string that specifies a URL provided by the author of the current visual style if visual styles are enabled; otherwise, an
empty string ("").

Remarks
This property checks the value of the IsEnabledByUser property internally.
VisualStyleInformation.Version VisualStyleInformation.
Version
I n this Article
Gets the version of the current visual style.

public static string Version { get; }


member this.Version : string

Returns
String String
A string that indicates the version of the current visual style if visual styles are enabled; otherwise, an empty string ("").

Remarks
This property checks the value of the IsEnabledByUser property internally.
VisualStyleRenderer VisualStyleRenderer Class
Provides methods for drawing and getting information about a VisualStyleElement. This class cannot be inherited.

D eclaration
public sealed class VisualStyleRenderer
type VisualStyleRenderer = class

I nheritance H ierarchy
Object Object

Remarks
The System.Windows.Forms.VisualStyles namespace exposes VisualStyleElement objects that represent all of the
controls and user interface (UI) elements that are supported by visual styles. To draw or get information about a
particular element, you must set a VisualStyleRenderer to the element you are interested in. A VisualStyleRenderer is
automatically set to a specified VisualStyleElement in the VisualStyleRenderer constructor, but you can also set an
existing VisualStyleRenderer to a different element by calling the SetParameters method.
To draw an element, use the DrawBackground method. The VisualStyleRenderer class also includes methods, such as
GetColor and GetEnumValue, that provide information about how an element is defined by the current visual style.
The VisualStyleRenderer constructor and many of the VisualStyleRenderer methods throw exceptions unless visual
styles are enabled in the operating system and visual styles are applied to the client area of application windows. To
check for these conditions, use the static IsSupported property.
The VisualStyleRenderer class wraps the functionality of the visual styles (UxTheme) API from the Windows Shell
portion of the Windows Platform SDK.

Constructors
VisualStyleRenderer(VisualStyleElement)
VisualStyleRenderer(VisualStyleElement)

Initializes a new instance of the VisualStyleRenderer class using the given VisualStyleElement.

VisualStyleRenderer(String, Int32, Int32)


VisualStyleRenderer(String, Int32, Int32)

Initializes a new instance of the VisualStyleRenderer class using the given class, part, and state values.

Properties
Class
Class

Gets the class name of the current visual style element.

Handle
Handle

Gets a unique identifier for the current class of visual style elements.

IsSupported
IsSupported

Gets a value specifying whether the operating system is using visual styles to draw controls.

LastHResult
LastHResult

Gets the last error code returned by the native visual styles (UxTheme) API methods encapsulated by the
VisualStyleRenderer class.

Part
Part

Gets the part of the current visual style element.

State
State

Gets the state of the current visual style element.

Methods
DrawBackground(IDeviceContext, Rectangle)
DrawBackground(IDeviceContext, Rectangle)

Draws the background image of the current visual style element within the specified bounding rectangle.

DrawBackground(IDeviceContext, Rectangle, Rectangle)


DrawBackground(IDeviceContext, Rectangle, Rectangle)

Draws the background image of the current visual style element within the specified bounding rectangle and
clipped to the specified clipping rectangle.

DrawEdge(IDeviceContext, Rectangle, Edges, EdgeStyle, EdgeEffects)


DrawEdge(IDeviceContext, Rectangle, Edges, EdgeStyle, EdgeEffects)

Draws one or more edges of the specified bounding rectangle.

DrawImage(Graphics, Rectangle, Image)


DrawImage(Graphics, Rectangle, Image)
Draws the specified image within the specified bounds.

DrawImage(Graphics, Rectangle, ImageList, Int32)


DrawImage(Graphics, Rectangle, ImageList, Int32)

Draws the image from the specified ImageList within the specified bounds.

DrawParentBackground(IDeviceContext, Rectangle, Control)


DrawParentBackground(IDeviceContext, Rectangle, Control)

Draws the background of a control's parent in the specified area.

DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags)


DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags)

Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text
formatting.

DrawText(IDeviceContext, Rectangle, String)


DrawText(IDeviceContext, Rectangle, String)

Draws text in the specified bounds using default formatting.

DrawText(IDeviceContext, Rectangle, String, Boolean)


DrawText(IDeviceContext, Rectangle, String, Boolean)

Draws text in the specified bounds with the option of displaying disabled text.

GetBackgroundContentRectangle(IDeviceContext, Rectangle)
GetBackgroundContentRectangle(IDeviceContext, Rectangle)

Returns the content area for the background of the current visual style element.

GetBackgroundExtent(IDeviceContext, Rectangle)
GetBackgroundExtent(IDeviceContext, Rectangle)

Returns the entire background area for the current visual style element.

GetBackgroundRegion(IDeviceContext, Rectangle)
GetBackgroundRegion(IDeviceContext, Rectangle)

Returns the region for the background of the current visual style element.
GetBoolean(BooleanProperty)
GetBoolean(BooleanProperty)

Returns the value of the specified Boolean property for the current visual style element.

GetColor(ColorProperty)
GetColor(ColorProperty)

Returns the value of the specified color property for the current visual style element.

GetEnumValue(EnumProperty)
GetEnumValue(EnumProperty)

Returns the value of the specified enumerated type property for the current visual style element.

GetFilename(FilenameProperty)
GetFilename(FilenameProperty)

Returns the value of the specified file name property for the current visual style element.

GetFont(IDeviceContext, FontProperty)
GetFont(IDeviceContext, FontProperty)

Returns the value of the specified font property for the current visual style element.

GetInteger(IntegerProperty)
GetInteger(IntegerProperty)

Returns the value of the specified integer property for the current visual style element.

GetMargins(IDeviceContext, MarginProperty)
GetMargins(IDeviceContext, MarginProperty)

Returns the value of the specified margins property for the current visual style element.

GetPartSize(IDeviceContext, ThemeSizeType)
GetPartSize(IDeviceContext, ThemeSizeType)

Returns the value of the specified size property of the current visual style part.

GetPartSize(IDeviceContext, Rectangle, ThemeSizeType)


GetPartSize(IDeviceContext, Rectangle, ThemeSizeType)

Returns the value of the specified size property of the current visual style part using the specified drawing bounds.
GetPoint(PointProperty)
GetPoint(PointProperty)

Returns the value of the specified point property for the current visual style element.

GetString(StringProperty)
GetString(StringProperty)

Returns the value of the specified string property for the current visual style element.

GetTextExtent(IDeviceContext, String, TextFormatFlags)


GetTextExtent(IDeviceContext, String, TextFormatFlags)

Returns the size and location of the specified string when drawn with the font of the current visual style element.

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)


GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

Returns the size and location of the specified string when drawn with the font of the current visual style element
within the specified initial bounding rectangle.

GetTextMetrics(IDeviceContext)
GetTextMetrics(IDeviceContext)

Retrieves information about the font specified by the current visual style element.

HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions)


HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions)

Returns a hit test code indicating whether the point is contained in the background of the current visual style
element and within the specified region.

HitTestBackground(IDeviceContext, Rectangle, Point, HitTestOptions)


HitTestBackground(IDeviceContext, Rectangle, Point, HitTestOptions)

Returns a hit test code indicating whether a point is contained in the background of the current visual style
element.

HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions)


HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions)

Returns a hit test code indicating whether the point is contained in the background of the current visual style
element and within the specified bounds.

IsBackgroundPartiallyTransparent()
IsBackgroundPartiallyTransparent()

Indicates whether the background of the current visual style element has any semitransparent or alpha-blended
pieces.

IsElementDefined(VisualStyleElement)
IsElementDefined(VisualStyleElement)

Determines whether the specified visual style element is defined by the current visual style.

SetParameters(String, Int32, Int32)


SetParameters(String, Int32, Int32)

Sets this VisualStyleRenderer to the visual style element represented by the specified class, part, and state values.

SetParameters(VisualStyleElement)
SetParameters(VisualStyleElement)

Sets this VisualStyleRenderer to the visual style element represented by the specified VisualStyleElement.

See Also
VisualStyleElement VisualStyleElement
VisualStyleRenderer.Class VisualStyleRenderer.Class
I n this Article
Gets the class name of the current visual style element.
public string Class { get; }
member this.Class : string

Returns
String String
A string that identifies the class of the current visual style element.

Remarks
This property identifies a group of related controls or user interface (UI) elements. For more information about the
class, part, and state of a visual style element, see the VisualStyleElement class.
VisualStyleRenderer.DrawBackground VisualStyle
Renderer.DrawBackground
I n this Article

Overloads
DrawBackground(IDeviceContext, Rectangle) Draw
Background(IDeviceContext, Rectangle) Draws the background image of the current visual style
element within the specified bounding rectangle.

DrawBackground(IDeviceContext, Rectangle, Rectangle) Draw


Background(IDeviceContext, Rectangle, Rectangle) Draws the background image of the current visual style
element within the specified bounding rectangle and clipped
to the specified clipping rectangle.

DrawBackground(IDeviceContext, Rectangle)
DrawBackground(IDeviceContext, Rectangle)
Draws the background image of the current visual style element within the specified bounding rectangle.
public void DrawBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds);
member this.DrawBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle -> unit

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext used to draw the background image.
bounds Rectangle Rectangle
A Rectangle in which the background image is drawn.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
Examples
The following code example demonstrates how to use the DrawBackground(IDeviceContext, Rectangle) method to a
draw a VisualStyleElement within a custom control's OnPaint method. This code example is part of a larger example
provided for the VisualStyleRenderer class overview.
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);

// Ensure that visual styles are supported.


if (!Application.RenderWithVisualStyles)
{
this.Text = "Visual styles are not enabled.";
TextRenderer.DrawText(e.Graphics, this.Text,
this.Font, this.Location, this.ForeColor);
return;
}

// Set the clip region to define the curved corners


// of the caption.
SetClipRegion();

// Draw each part of the window.


foreach (KeyValuePair<string, VisualStyleElement> entry
in windowElements)
{
if (SetRenderer(entry.Value))
{
renderer.DrawBackground(e.Graphics,
elementRectangles[entry.Key]);
}
}

// Draw the caption text.


TextRenderer.DrawText(e.Graphics, this.Text, this.Font,
elementRectangles["windowCaption"], Color.White,
TextFormatFlags.VerticalCenter |
TextFormatFlags.HorizontalCenter);
}

Remarks
This method draws the background of the current visual style element specified by the Class, Part, and State properties.
If the Width or Height of the rectangle specified by the bounds parameter is less than 0, the DrawBackground method
will return without drawing the background.
The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call
the GetEnumValue method with an argument value of EnumProperty.BackgroundType. To determine whether the
element background will scale to fit the specified bounds, call the GetEnumValue method with an argument value of
EnumProperty.SizingType.

DrawBackground(IDeviceContext, Rectangle, Rectangle)


DrawBackground(IDeviceContext, Rectangle, Rectangle)
Draws the background image of the current visual style element within the specified bounding rectangle and clipped to
the specified clipping rectangle.
public void DrawBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds,
System.Drawing.Rectangle clipRectangle);
member this.DrawBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle *
System.Drawing.Rectangle -> unit

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext used to draw the background image.
bounds Rectangle Rectangle
A Rectangle in which the background image is drawn.
clipRectangle Rectangle Rectangle
A Rectangle that defines a clipping rectangle for the drawing operation.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
Remarks
This method draws the background of the current visual style element specified by the Class, Part, and State properties.
The background will be clipped to the area specified by the clipRectangle parameter.
If the Width or Height of the rectangle specified by either the bounds or clipRectangle parameters is less than 0, the
DrawBackground method will return without drawing the background.
The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call
the GetEnumValue method with an argument value of EnumProperty.BackgroundType. To determine whether the
element background will scale to fit the specified bounds, call the GetEnumValue method with an argument value of
EnumProperty.SizingType.
VisualStyleRenderer.DrawEdge VisualStyleRenderer.Draw
Edge
I n this Article
Draws one or more edges of the specified bounding rectangle.

public System.Drawing.Rectangle DrawEdge (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle


bounds, System.Windows.Forms.VisualStyles.Edges edges, System.Windows.Forms.VisualStyles.EdgeStyle
style, System.Windows.Forms.VisualStyles.EdgeEffects effects);
member this.DrawEdge : System.Drawing.IDeviceContext * System.Drawing.Rectangle *
System.Windows.Forms.VisualStyles.Edges * System.Windows.Forms.VisualStyles.EdgeStyle *
System.Windows.Forms.VisualStyles.EdgeEffects -> System.Drawing.Rectangle

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext used to draw the edges.
bounds Rectangle Rectangle
The Rectangle whose bounds define the edges to draw.
edges Edges Edges
A bitwise combination of the Edges values.
style EdgeStyle EdgeStyle
A bitwise combination of the EdgeStyle values.
effects EdgeEffects EdgeEffects
A bitwise combination of the EdgeEffects values.
Returns
Rectangle Rectangle
A Rectangle that represents the interior of the bounds parameter, minus the edges that were drawn.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
VisualStyleRenderer.DrawImage VisualStyleRenderer.
DrawImage
I n this Article

Overloads
DrawImage(Graphics, Rectangle, Image) DrawImage(Graphics,
Rectangle, Image) Draws the specified image within the specified bounds.

DrawImage(Graphics, Rectangle, ImageList, Int32) DrawImage(


Graphics, Rectangle, ImageList, Int32) Draws the image from the specified ImageList within the
specified bounds.

DrawImage(Graphics, Rectangle, Image) DrawImage(Graphics,


Rectangle, Image)
Draws the specified image within the specified bounds.
public void DrawImage (System.Drawing.Graphics g, System.Drawing.Rectangle bounds,
System.Drawing.Image image);
member this.DrawImage : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Image ->
unit

Parameters
g Graphics Graphics
The Graphics used to draw the image.
bounds Rectangle Rectangle
A Rectangle in which the image is drawn.
image Image Image
The Image to draw.
Exceptions
ArgumentNullException ArgumentNullException
g or image is null .
Remarks
If the visual style applies one of the effects specified by the System.Windows.Forms.VisualStyles.IconEffect values to
the current element, this method will apply the effect to the drawn image.

DrawImage(Graphics, Rectangle, ImageList, Int32)


DrawImage(Graphics, Rectangle, ImageList, Int32)
Draws the image from the specified ImageList within the specified bounds.
public void DrawImage (System.Drawing.Graphics g, System.Drawing.Rectangle bounds,
System.Windows.Forms.ImageList imageList, int imageIndex);
member this.DrawImage : System.Drawing.Graphics * System.Drawing.Rectangle *
System.Windows.Forms.ImageList * int -> unit

Parameters
g Graphics Graphics
The Graphics used to draw the image.
bounds Rectangle Rectangle
A Rectangle in which the image is drawn.
imageList ImageList ImageList
An ImageList that contains the Image to draw.
imageIndex Int32 Int32
The index of the Image within imageList to draw.

Exceptions
ArgumentNullException ArgumentNullException
g or image is null .
ArgumentOutOfRangeException ArgumentOutOfRangeException
imageIndex is less than 0, or greater than or equal to the number of images in imageList .
Remarks
If the visual style applies one of the effects specified by the System.Windows.Forms.VisualStyles.IconEffect values to
the current element, this method will apply the effect to the drawn image.
VisualStyleRenderer.DrawParentBackground VisualStyle
Renderer.DrawParentBackground
I n this Article
Draws the background of a control's parent in the specified area.

public void DrawParentBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds,


System.Windows.Forms.Control childControl);
member this.DrawParentBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle *
System.Windows.Forms.Control -> unit

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext used to draw the background of the parent of childControl . This object typically belongs to the
child control.
bounds Rectangle Rectangle
A Rectangle in which to draw the parent control's background. This rectangle should be inside the child control's
bounds.
childControl Control Control
The control whose parent's background will be drawn.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
VisualStyleRenderer.DrawText VisualStyleRenderer.Draw
Text
I n this Article

Overloads
DrawText(IDeviceContext, Rectangle, String, Boolean, Text
FormatFlags) DrawText(IDeviceContext, Rectangle, String, Draws text in the specified bounding rectangle with the option
Boolean, TextFormatFlags) of displaying disabled text and applying other text formatting.

DrawText(IDeviceContext, Rectangle, String) DrawText(IDevice


Context, Rectangle, String) Draws text in the specified bounds using default formatting.

DrawText(IDeviceContext, Rectangle, String, Boolean) Draw


Text(IDeviceContext, Rectangle, String, Boolean) Draws text in the specified bounds with the option of
displaying disabled text.

DrawText(IDeviceContext, Rectangle, String, Boolean,


TextFormatFlags) DrawText(IDeviceContext, Rectangle, String,
Boolean, TextFormatFlags)
Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text
formatting.
public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string
textToDraw, bool drawDisabled, System.Windows.Forms.TextFormatFlags flags);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool *
System.Windows.Forms.TextFormatFlags -> unit

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext used to draw the text.
bounds Rectangle Rectangle
A Rectangle in which to draw the text.
textToDraw String String
The text to draw.
drawDisabled Boolean Boolean
true to draw grayed-out text; otherwise, false .
flags TextFormatFlags TextFormatFlags
A bitwise combination of the TextFormatFlags values.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

DrawText(IDeviceContext, Rectangle, String)


DrawText(IDeviceContext, Rectangle, String)
Draws text in the specified bounds using default formatting.

public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string


textToDraw);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string -> unit

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext used to draw the text.
bounds Rectangle Rectangle
A Rectangle in which to draw the text.
textToDraw String String
The text to draw.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

DrawText(IDeviceContext, Rectangle, String, Boolean)


DrawText(IDeviceContext, Rectangle, String, Boolean)
Draws text in the specified bounds with the option of displaying disabled text.
public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string
textToDraw, bool drawDisabled);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool ->
unit

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext used to draw the text.
bounds Rectangle Rectangle
A Rectangle in which to draw the text.
textToDraw String String
The text to draw.
drawDisabled Boolean Boolean
true to draw grayed-out text; otherwise, false .
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
VisualStyleRenderer.GetBackgroundContentRectangle
VisualStyleRenderer.GetBackgroundContentRectangle
I n this Article
Returns the content area for the background of the current visual style element.

public System.Drawing.Rectangle GetBackgroundContentRectangle (System.Drawing.IDeviceContext dc,


System.Drawing.Rectangle bounds);
member this.GetBackgroundContentRectangle : System.Drawing.IDeviceContext * System.Drawing.Rectangle
-> System.Drawing.Rectangle

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
bounds Rectangle Rectangle
A Rectangle that contains the entire background area of the current visual style element.
Returns
Rectangle Rectangle
A Rectangle that contains the content area for the background of the current visual style element.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

Remarks
A visual style can define a content area within each background image. This is the area in which content such as text
and icons can be placed without overwriting background borders. This method uses the given background area to
calculate the content area for the current visual style element.
VisualStyleRenderer.GetBackgroundExtent VisualStyle
Renderer.GetBackgroundExtent
I n this Article
Returns the entire background area for the current visual style element.

public System.Drawing.Rectangle GetBackgroundExtent (System.Drawing.IDeviceContext dc,


System.Drawing.Rectangle contentBounds);
member this.GetBackgroundExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle ->
System.Drawing.Rectangle

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
contentBounds Rectangle Rectangle
A Rectangle that contains the content area of the current visual style element.
Returns
Rectangle Rectangle
A Rectangle that contains the entire background area of the current visual style element.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

Remarks
A visual style can define a content area within each background image. This is the area in which content such as text
and icons can be placed without overwriting background borders. This method uses the given content area to calculate
the entire background area for the current visual style element.
VisualStyleRenderer.GetBackgroundRegion VisualStyle
Renderer.GetBackgroundRegion
I n this Article
Returns the region for the background of the current visual style element.

public System.Drawing.Region GetBackgroundRegion (System.Drawing.IDeviceContext dc,


System.Drawing.Rectangle bounds);
member this.GetBackgroundRegion : System.Drawing.IDeviceContext * System.Drawing.Rectangle ->
System.Drawing.Region

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
bounds Rectangle Rectangle
A Rectangle that contains the entire background area of the current visual style element.
Returns
Region Region
The Region that contains the background of the current visual style element.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

Examples
The following code example demonstrates how to use the GetBackgroundRegion method in a custom control. This
example uses GetBackgroundRegion to get the Region of the window title bar element returned by the
VisualStyleElement.Window.Caption.Active property. This Region is used to set the Control.Region property of the
control, so that the window title bar will appear with the rounded corners defined by the standard Windows XP visual
style. This code example is part of a larger example provided for the VisualStyleRenderer class overview.
// Calculate and set the clipping region for the control
// so that the corners of the title bar are rounded.
private void SetClipRegion()
{
if (!Application.RenderWithVisualStyles)
{
return;
}

using (Graphics g = this.CreateGraphics())


{
// Get the current region for the window caption.
if (SetRenderer(windowElements["windowCaption"]))
{
Region clipRegion = renderer.GetBackgroundRegion(
g, elementRectangles["windowCaption"]);

// Get the client rectangle, but exclude the region


// of the window caption.
int height = (int)clipRegion.GetBounds(g).Height;
Rectangle nonCaptionRect = new Rectangle(
ClientRectangle.X,
ClientRectangle.Y + height,
ClientRectangle.Width,
ClientRectangle.Height - height);

// Add the rectangle to the caption region, and


// make this region the form's clipping region.
clipRegion.Union(nonCaptionRect);
this.Region = clipRegion;
}
}
}

Remarks
This method can be used to get the Region of a visual style element that has partially transparent or alpha-blended
parts in its background.
VisualStyleRenderer.GetBoolean VisualStyleRenderer.Get
Boolean
I n this Article
Returns the value of the specified Boolean property for the current visual style element.

public bool GetBoolean (System.Windows.Forms.VisualStyles.BooleanProperty prop);


member this.GetBoolean : System.Windows.Forms.VisualStyles.BooleanProperty -> bool

Parameters
prop BooleanProperty BooleanProperty
One of the BooleanProperty values that specifies which property value to retrieve for the current visual style element.
Returns
Boolean Boolean
true if the property specified by the prop parameter is true for the current visual style element; otherwise, false .
Exceptions
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the BooleanProperty values.

Remarks
Visual styles use a set of Boolean values to describe some properties of the elements defined by a style. These
properties are encapsulated by the BooleanProperty values.
VisualStyleRenderer.GetColor VisualStyleRenderer.Get
Color
I n this Article
Returns the value of the specified color property for the current visual style element.

public System.Drawing.Color GetColor (System.Windows.Forms.VisualStyles.ColorProperty prop);


member this.GetColor : System.Windows.Forms.VisualStyles.ColorProperty -> System.Drawing.Color

Parameters
prop ColorProperty ColorProperty
One of the ColorProperty values that specifies which property value to retrieve for the current visual style element.
Returns
Color Color
A Color that contains the value of the property specified by the prop parameter for the current visual style element.
Exceptions
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the ColorProperty values.

Remarks
Visual styles use a set of color values to describe some properties of the elements defined by a style. These properties
are encapsulated by the ColorProperty values.
VisualStyleRenderer.GetEnumValue VisualStyleRenderer.
GetEnumValue
I n this Article
Returns the value of the specified enumerated type property for the current visual style element.

public int GetEnumValue (System.Windows.Forms.VisualStyles.EnumProperty prop);


member this.GetEnumValue : System.Windows.Forms.VisualStyles.EnumProperty -> int

Parameters
prop EnumProperty EnumProperty
One of the EnumProperty values that specifies which property value to retrieve for the current visual style element.
Returns
Int32 Int32
The integer value of the property specified by the prop parameter for the current visual style element.
Exceptions
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the EnumProperty values.

Remarks
Visual styles use a set of enumerated types to describe some properties of the elements defined by a style. These
enumerated types are encapsulated by the EnumProperty values.
VisualStyleRenderer.GetFilename VisualStyleRenderer.Get
Filename
I n this Article
Returns the value of the specified file name property for the current visual style element.

public string GetFilename (System.Windows.Forms.VisualStyles.FilenameProperty prop);


member this.GetFilename : System.Windows.Forms.VisualStyles.FilenameProperty -> string

Parameters
prop FilenameProperty FilenameProperty
One of the FilenameProperty values that specifies which property value to retrieve for the current visual style element.
Returns
String String
A String that contains the value of the property specified by the prop parameter for the current visual style element.
Exceptions
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the FilenameProperty values.

Remarks
Visual styles can specify the names of image files that are used to draw a particular element in different sizes and
resolutions. These file names are encapsulated by the FilenameProperty values.
VisualStyleRenderer.GetFont VisualStyleRenderer.GetFont
I n this Article
Returns the value of the specified font property for the current visual style element.
public System.Drawing.Font GetFont (System.Drawing.IDeviceContext dc,
System.Windows.Forms.VisualStyles.FontProperty prop);
member this.GetFont : System.Drawing.IDeviceContext * System.Windows.Forms.VisualStyles.FontProperty
-> System.Drawing.Font

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
prop FontProperty FontProperty
One of the FontProperty values that specifies which property value to retrieve for the current visual style element.
Returns
Font Font
A Font that contains the value of the property specified by the prop parameter for the current visual style element.

Exceptions
ArgumentNullException ArgumentNullException
dc is null .
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the FontProperty values.

Remarks
Visual styles use a set of font values to describe some properties of the elements defined by a style. These properties
are encapsulated by the FontProperty values.
VisualStyleRenderer.GetInteger VisualStyleRenderer.Get
Integer
I n this Article
Returns the value of the specified integer property for the current visual style element.

public int GetInteger (System.Windows.Forms.VisualStyles.IntegerProperty prop);


member this.GetInteger : System.Windows.Forms.VisualStyles.IntegerProperty -> int

Parameters
prop IntegerProperty IntegerProperty
One of the IntegerProperty values that specifies which property value to retrieve for the current visual style element.
Returns
Int32 Int32
The integer value of the property specified by the prop parameter for the current visual style element.
Exceptions
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the IntegerProperty values.

Remarks
Visual styles use a set of integer values to describe some properties of the elements defined by a style. These
properties are encapsulated by the IntegerProperty values.
VisualStyleRenderer.GetMargins VisualStyleRenderer.Get
Margins
I n this Article
Returns the value of the specified margins property for the current visual style element.

public System.Windows.Forms.Padding GetMargins (System.Drawing.IDeviceContext dc,


System.Windows.Forms.VisualStyles.MarginProperty prop);
member this.GetMargins : System.Drawing.IDeviceContext *
System.Windows.Forms.VisualStyles.MarginProperty -> System.Windows.Forms.Padding

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
prop MarginProperty MarginProperty
One of the MarginProperty values that specifies which property value to retrieve for the current visual style element.
Returns
Padding Padding
A Padding that contains the value of the property specified by the prop parameter for the current visual style element.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the MarginProperty values.

Remarks
Visual styles use a set of margin values to describe some properties of the elements defined by a style. These
properties are encapsulated by the MarginProperty values.
VisualStyleRenderer.GetPartSize VisualStyleRenderer.Get
PartSize
I n this Article

Overloads
GetPartSize(IDeviceContext, ThemeSizeType) GetPartSize(
IDeviceContext, ThemeSizeType) Returns the value of the specified size property of the current
visual style part.

GetPartSize(IDeviceContext, Rectangle, ThemeSizeType) Get


PartSize(IDeviceContext, Rectangle, ThemeSizeType) Returns the value of the specified size property of the current
visual style part using the specified drawing bounds.

GetPartSize(IDeviceContext, ThemeSizeType)
GetPartSize(IDeviceContext, ThemeSizeType)
Returns the value of the specified size property of the current visual style part.

public System.Drawing.Size GetPartSize (System.Drawing.IDeviceContext dc,


System.Windows.Forms.VisualStyles.ThemeSizeType type);
member this.GetPartSize : System.Drawing.IDeviceContext *
System.Windows.Forms.VisualStyles.ThemeSizeType -> System.Drawing.Size

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
type ThemeSizeType ThemeSizeType
One of the ThemeSizeType values that specifies which size value to retrieve for the part.
Returns
Size Size
A Size that contains the size specified by the type parameter for the current visual style part.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the ThemeSizeType values.
Examples
The following code example demonstrates how to use the GetPartSize(IDeviceContext, ThemeSizeType) method in a
custom control to get the sizes of a window title bar, Close button, borders, and sizing handle specified by the visual
style. These sizes are used to calculate the sizes of the Rectangle objects used to draw the VisualStyleElement objects
that represent these window parts. This code example is part of a larger example provided for the VisualStyleRenderer
class overview.
// Get the sizes and offsets for the window parts as specified
// by the visual style.
private void GetPartDetails()
{
// Do nothing further if visual styles are not enabled.
if (!Application.RenderWithVisualStyles)
{
return;
}

using (Graphics g = this.CreateGraphics())


{
// Get the size and offset of the close button.
if (SetRenderer(windowElements["windowClose"]))
{
closeButtonSize =
renderer.GetPartSize(g, ThemeSizeType.True);
closeButtonOffset =
renderer.GetPoint(PointProperty.Offset);
}

// Get the height of the window caption.


if (SetRenderer(windowElements["windowCaption"]))
{
captionHeight = renderer.GetPartSize(g,
ThemeSizeType.True).Height;
}

// Get the thickness of the left, bottom,


// and right window frame.
if (SetRenderer(windowElements["windowLeft"]))
{
frameThickness = renderer.GetPartSize(g,
ThemeSizeType.True).Width;
}

// Get the size of the resizing gripper.


if (SetRenderer(windowElements["statusGripper"]))
{
gripperSize = renderer.GetPartSize(g,
ThemeSizeType.True);
}
}
}

Remarks
Typically, only the True and Minimum values should be used for the type parameter of this method.

GetPartSize(IDeviceContext, Rectangle, ThemeSizeType)


GetPartSize(IDeviceContext, Rectangle, ThemeSizeType)
Returns the value of the specified size property of the current visual style part using the specified drawing bounds.
public System.Drawing.Size GetPartSize (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle
bounds, System.Windows.Forms.VisualStyles.ThemeSizeType type);
member this.GetPartSize : System.Drawing.IDeviceContext * System.Drawing.Rectangle *
System.Windows.Forms.VisualStyles.ThemeSizeType -> System.Drawing.Size

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
bounds Rectangle Rectangle
A Rectangle that contains the area in which the part will be drawn.
type ThemeSizeType ThemeSizeType
One of the ThemeSizeType values that specifies which size value to retrieve for the part.
Returns
Size Size
A Size that contains the size specified by the type parameter for the current visual style part.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the ThemeSizeType values.
VisualStyleRenderer.GetPoint VisualStyleRenderer.Get
Point
I n this Article
Returns the value of the specified point property for the current visual style element.

public System.Drawing.Point GetPoint (System.Windows.Forms.VisualStyles.PointProperty prop);


member this.GetPoint : System.Windows.Forms.VisualStyles.PointProperty -> System.Drawing.Point

Parameters
prop PointProperty PointProperty
One of the PointProperty values that specifies which property value to retrieve for the current visual style element.
Returns
Point Point
A Point that contains the value of the property specified by the prop parameter for the current visual style element.
Exceptions
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the PointProperty values.

Examples
The following code example demonstrates how to use the GetPoint method in a custom control to get the offset of the
window Close button in relation to the upper-right corner of the title bar. This code example is part of a larger example
provided for the VisualStyleRenderer class overview.
// Get the sizes and offsets for the window parts as specified
// by the visual style.
private void GetPartDetails()
{
// Do nothing further if visual styles are not enabled.
if (!Application.RenderWithVisualStyles)
{
return;
}

using (Graphics g = this.CreateGraphics())


{
// Get the size and offset of the close button.
if (SetRenderer(windowElements["windowClose"]))
{
closeButtonSize =
renderer.GetPartSize(g, ThemeSizeType.True);
closeButtonOffset =
renderer.GetPoint(PointProperty.Offset);
}

// Get the height of the window caption.


if (SetRenderer(windowElements["windowCaption"]))
{
captionHeight = renderer.GetPartSize(g,
ThemeSizeType.True).Height;
}

// Get the thickness of the left, bottom,


// and right window frame.
if (SetRenderer(windowElements["windowLeft"]))
{
frameThickness = renderer.GetPartSize(g,
ThemeSizeType.True).Width;
}

// Get the size of the resizing gripper.


if (SetRenderer(windowElements["statusGripper"]))
{
gripperSize = renderer.GetPartSize(g,
ThemeSizeType.True);
}
}
}

Remarks
Visual styles use a set of point values to describe some properties of the elements defined by a style. These properties
are encapsulated by the PointProperty values.
VisualStyleRenderer.GetString VisualStyleRenderer.Get
String
I n this Article
Returns the value of the specified string property for the current visual style element.

public string GetString (System.Windows.Forms.VisualStyles.StringProperty prop);


member this.GetString : System.Windows.Forms.VisualStyles.StringProperty -> string

Parameters
prop StringProperty StringProperty
One of the StringProperty values that specifies which property value to retrieve for the current visual style element.
Returns
String String
A String that contains the value of the property specified by the prop parameter for the current visual style element.
Exceptions
InvalidEnumArgumentException InvalidEnumArgumentException
prop is not one of the StringProperty values.

Remarks
Visual styles use a set of string values to describe some properties of the elements defined by a style. These properties
are encapsulated by the StringProperty values.
VisualStyleRenderer.GetTextExtent VisualStyleRenderer.
GetTextExtent
I n this Article

Overloads
GetTextExtent(IDeviceContext, String, TextFormatFlags) GetText
Extent(IDeviceContext, String, TextFormatFlags) Returns the size and location of the specified string when
drawn with the font of the current visual style element.

GetTextExtent(IDeviceContext, Rectangle, String, TextFormat


Flags) GetTextExtent(IDeviceContext, Rectangle, String, Text Returns the size and location of the specified string when
FormatFlags) drawn with the font of the current visual style element within
the specified initial bounding rectangle.

GetTextExtent(IDeviceContext, String, TextFormatFlags)


GetTextExtent(IDeviceContext, String, TextFormatFlags)
Returns the size and location of the specified string when drawn with the font of the current visual style element.
public System.Drawing.Rectangle GetTextExtent (System.Drawing.IDeviceContext dc, string textToDraw,
System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * string *
System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
textToDraw String String
The string to measure.
flags TextFormatFlags TextFormatFlags
A bitwise combination of the TextFormatFlags values.
Returns
Rectangle Rectangle
A Rectangle that contains the area required to fit the rendered text.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)


GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)
Returns the size and location of the specified string when drawn with the font of the current visual style element within
the specified initial bounding rectangle.
public System.Drawing.Rectangle GetTextExtent (System.Drawing.IDeviceContext dc,
System.Drawing.Rectangle bounds, string textToDraw, System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string *
System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
bounds Rectangle Rectangle
A Rectangle used to control the flow and wrapping of the text.
textToDraw String String
The string to measure.
flags TextFormatFlags TextFormatFlags
A bitwise combination of the TextFormatFlags values.
Returns
Rectangle Rectangle
A Rectangle that contains the area required to fit the rendered text.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
VisualStyleRenderer.GetTextMetrics VisualStyleRenderer.
GetTextMetrics
I n this Article
Retrieves information about the font specified by the current visual style element.

public System.Windows.Forms.VisualStyles.TextMetrics GetTextMetrics (System.Drawing.IDeviceContext


dc);
member this.GetTextMetrics : System.Drawing.IDeviceContext ->
System.Windows.Forms.VisualStyles.TextMetrics

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
Returns
TextMetrics TextMetrics
A TextMetrics that provides information about the font specified by the current visual style element.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .
VisualStyleRenderer.Handle VisualStyleRenderer.Handle
I n this Article
Gets a unique identifier for the current class of visual style elements.
public IntPtr Handle { get; }
member this.Handle : nativeint

Returns
IntPtr IntPtr
An IntPtr that identifies a set of data that defines the class of elements specified by Class.
Exceptions
InvalidOperationException InvalidOperationException
The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.

Remarks
This property is used internally by the VisualStyleRenderer methods. If the class of elements specified by the Class
property is not defined by the current visual style, then this property returns IntPtr.Zero.
This property value is invalidated when the visual style of the operating system changes, or when the user disables
visual styles. If you access this property directly, your code should query this property again to get a new handle when
the SystemEvents.UserPreferenceChanged event is raised with the UserPreferenceChangedEventArgs.Category
property value of UserPreferenceCategory.VisualStyle.
VisualStyleRenderer.HitTestBackground VisualStyle
Renderer.HitTestBackground
I n this Article

Overloads
HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, Hit
TestOptions) HitTestBackground(IDeviceContext, Rectangle, Int Returns a hit test code indicating whether the point is
Ptr, Point, HitTestOptions) contained in the background of the current visual style
element and within the specified region.

HitTestBackground(IDeviceContext, Rectangle, Point, HitTest


Options) HitTestBackground(IDeviceContext, Rectangle, Point, Returns a hit test code indicating whether a point is contained
HitTestOptions) in the background of the current visual style element.

HitTestBackground(Graphics, Rectangle, Region, Point, HitTest


Options) HitTestBackground(Graphics, Rectangle, Region, Returns a hit test code indicating whether the point is
Point, HitTestOptions) contained in the background of the current visual style
element and within the specified bounds.

HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point,


HitTestOptions) HitTestBackground(IDeviceContext, Rectangle,
IntPtr, Point, HitTestOptions)
Returns a hit test code indicating whether the point is contained in the background of the current visual style element
and within the specified region.
public System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground
(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle backgroundRectangle, IntPtr hRgn,
System.Drawing.Point pt, System.Windows.Forms.VisualStyles.HitTestOptions options);
member this.HitTestBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * nativeint
* System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions ->
System.Windows.Forms.VisualStyles.HitTestCode

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
backgroundRectangle Rectangle Rectangle
A Rectangle that contains the background of the current visual style element.
hRgn IntPtr IntPtr
A Windows handle to a Region that specifies the bounds of the hit test area within the background.
pt Point Point
The Point to test.
options HitTestOptions HitTestOptions
A bitwise combination of the HitTestOptions values.
Returns
HitTestCode HitTestCode
A HitTestCode that describes where pt is located in the background of the current visual style element.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

HitTestBackground(IDeviceContext, Rectangle, Point,


HitTestOptions) HitTestBackground(IDeviceContext, Rectangle,
Point, HitTestOptions)
Returns a hit test code indicating whether a point is contained in the background of the current visual style element.

public System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground


(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle backgroundRectangle,
System.Drawing.Point pt, System.Windows.Forms.VisualStyles.HitTestOptions options);
member this.HitTestBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle *
System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions ->
System.Windows.Forms.VisualStyles.HitTestCode

Parameters
dc IDeviceContext IDeviceContext
The IDeviceContext this operation will use.
backgroundRectangle Rectangle Rectangle
A Rectangle that contains the background of the current visual style element.
pt Point Point
The Point to test.
options HitTestOptions HitTestOptions
A bitwise combination of the HitTestOptions values.
Returns
HitTestCode HitTestCode
A HitTestCode that describes where pt is located in the background of the current visual style element.
Exceptions
ArgumentNullException ArgumentNullException
dc is null .

HitTestBackground(Graphics, Rectangle, Region, Point,


HitTestOptions) HitTestBackground(Graphics, Rectangle, Region,
Point, HitTestOptions)
Returns a hit test code indicating whether the point is contained in the background of the current visual style element
and within the specified bounds.
public System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground (System.Drawing.Graphics g,
System.Drawing.Rectangle backgroundRectangle, System.Drawing.Region region, System.Drawing.Point pt,
System.Windows.Forms.VisualStyles.HitTestOptions options);
member this.HitTestBackground : System.Drawing.Graphics * System.Drawing.Rectangle *
System.Drawing.Region * System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions ->
System.Windows.Forms.VisualStyles.HitTestCode

Parameters
g Graphics Graphics
The Graphics this operation will use.
backgroundRectangle Rectangle Rectangle
A Rectangle that contains the background of the current visual style element.
region Region Region
A Region that specifies the bounds of the hit test area within the background.
pt Point Point
The Point to test.
options HitTestOptions HitTestOptions
A bitwise combination of the HitTestOptions values.
Returns
HitTestCode HitTestCode
A HitTestCode that describes where pt is located in the background of the current visual style element, if at all.

Exceptions
ArgumentNullException ArgumentNullException
g is null .
VisualStyleRenderer.IsBackgroundPartiallyTransparent
VisualStyleRenderer.IsBackgroundPartiallyTransparent
I n this Article
Indicates whether the background of the current visual style element has any semitransparent or alpha-blended pieces.

public bool IsBackgroundPartiallyTransparent ();


member this.IsBackgroundPartiallyTransparent : unit -> bool

Returns
Boolean Boolean
true if the background of the current visual style element has any semitransparent or alpha-blended pieces;
otherwise, false .
VisualStyleRenderer.IsElementDefined VisualStyle
Renderer.IsElementDefined
I n this Article
Determines whether the specified visual style element is defined by the current visual style.

public static bool IsElementDefined (System.Windows.Forms.VisualStyles.VisualStyleElement element);


static member IsElementDefined : System.Windows.Forms.VisualStyles.VisualStyleElement -> bool

Parameters
element VisualStyleElement VisualStyleElement
A VisualStyleElement whose class and part combination will be verified.
Returns
Boolean Boolean
true if the combination of the ClassName and Part properties of element are defined; otherwise, false .
Exceptions
InvalidOperationException InvalidOperationException
The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.

Examples
The following code example demonstrates how to use the IsElementDefined method to determine whether to initialize
a VisualStyleRenderer to a given VisualStyleElement. This code example is part of a larger example provided for the
VisualStyleRenderer class overview.
// Set the VisualStyleRenderer to a new element.
private bool SetRenderer(VisualStyleElement element)
{
if (!VisualStyleRenderer.IsElementDefined(element))
{
return false;
}

if (renderer == null)
{
renderer = new VisualStyleRenderer(element);
}
else
{
renderer.SetParameters(element);
}

return true;
}
Remarks
This method checks the value of the IsSupported property internally.
VisualStyleRenderer.IsSupported VisualStyleRenderer.Is
Supported
I n this Article
Gets a value specifying whether the operating system is using visual styles to draw controls.

public static bool IsSupported { get; }


member this.IsSupported : bool

Returns
Boolean Boolean
true if the operating system supports visual styles, the user has enabled visual styles in the operating system, and
visual styles are applied to the client area of application windows; otherwise, false .

Remarks
The following table describes how to individually check for each of the three conditions that must exist for the
IsSupported property to return true .

CO ND ITIO N HO W TO D E TER MINE S EPAR ATELY

The operating system supports visual styles. Verify that the IsSupportedByOS property of the
VisualStyleInformation class is true .

The user has enabled visual styles in the operating system. Verify that the IsEnabledByUser property of the
VisualStyleInformation class is true .

Visual styles are being used to draw the client area of Verify that the VisualStyleState property of the Application
application windows. class has the value VisualStyleState.ClientAreaEnabled or
VisualStyleState.ClientAndNonClientAreasEnabled.
VisualStyleRenderer.LastHResult VisualStyleRenderer.Last
HResult
I n this Article
Gets the last error code returned by the native visual styles (UxTheme) API methods encapsulated by the
VisualStyleRenderer class.
public int LastHResult { get; }
member this.LastHResult : int

Returns
Int32 Int32
A value specifying the last error code returned by the native visual styles API methods that this class encapsulates.

Remarks
This property gets the HRESULT value that was returned by the last native visual styles API method called by a
member of the VisualStyleRenderer class. For more information about the native visual styles API, see "Using
Windows XP Visual Styles" in the Platform SDK portion of the MSDN Library at http://msdn.microsoft.com/library.
VisualStyleRenderer.Part VisualStyleRenderer.Part
I n this Article
Gets the part of the current visual style element.
public int Part { get; }
member this.Part : int

Returns
Int32 Int32
A value that specifies the part of the current visual style element.

Remarks
This property identifies a particular specialization of a class. For more information about the class, part, and state of a
visual style element, see the VisualStyleElement class.
VisualStyleRenderer.SetParameters VisualStyleRenderer.
SetParameters
I n this Article

Overloads
SetParameters(String, Int32, Int32) SetParameters(String,
Int32, Int32) Sets this VisualStyleRenderer to the visual style element
represented by the specified class, part, and state values.

SetParameters(VisualStyleElement) SetParameters(VisualStyle
Element) Sets this VisualStyleRenderer to the visual style element
represented by the specified VisualStyleElement.

SetParameters(String, Int32, Int32) SetParameters(String, Int32,


Int32)
Sets this VisualStyleRenderer to the visual style element represented by the specified class, part, and state values.

public void SetParameters (string className, int part, int state);


member this.SetParameters : string * int * int -> unit

Parameters
className String String
The new value of the Class property.
part Int32 Int32
The new value of the Part property.
state Int32 Int32
The new value of the State property.
Exceptions
ArgumentException ArgumentException
The combination of className , part , and state is not defined by the current visual style.
InvalidOperationException InvalidOperationException
The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.
Remarks
This method checks the value of the IsSupported property internally. Before calling this method, you should call the
IsElementDefined method to verify that the current visual style provides a definition for the element specified by the
className , part , and state parameters.

SetParameters(VisualStyleElement)
SetParameters(VisualStyleElement)
Sets this VisualStyleRenderer to the visual style element represented by the specified VisualStyleElement.
public void SetParameters (System.Windows.Forms.VisualStyles.VisualStyleElement element);
member this.SetParameters : System.Windows.Forms.VisualStyles.VisualStyleElement -> unit

Parameters
element VisualStyleElement VisualStyleElement
A VisualStyleElement that specifies the new values of the Class, Part, and State properties.
Exceptions
ArgumentException ArgumentException
element is not defined by the current visual style.

InvalidOperationException InvalidOperationException
The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.
Examples
The following code example demonstrates how to use the SetParameters(VisualStyleElement) method to set a
VisualStyleRenderer to a new VisualStyleElement. This code example is part of a larger example provided for the
VisualStyleRenderer class overview.

// Set the VisualStyleRenderer to a new element.


private bool SetRenderer(VisualStyleElement element)
{
if (!VisualStyleRenderer.IsElementDefined(element))
{
return false;
}

if (renderer == null)
{
renderer = new VisualStyleRenderer(element);
}
else
{
renderer.SetParameters(element);
}

return true;
}
Remarks
This method checks the value of the IsSupported property internally. Before calling this method, you should call the
IsElementDefined method to verify that the current visual style provides a definition for the element specified by the
element parameter.
VisualStyleRenderer.State VisualStyleRenderer.State
I n this Article
Gets the state of the current visual style element.
public int State { get; }
member this.State : int

Returns
Int32 Int32
A value that identifies the state of the current visual style element.

Remarks
This property identifies the current visual state of the element identified by the current Class and Part property values.
For more information about the class, part, and state of a visual style element, see the VisualStyleElement class.
VisualStyleRenderer VisualStyleRenderer
I n this Article

Overloads
VisualStyleRenderer(VisualStyleElement) VisualStyleRenderer(
VisualStyleElement) Initializes a new instance of the VisualStyleRenderer class using
the given VisualStyleElement.

VisualStyleRenderer(String, Int32, Int32) VisualStyleRenderer(


String, Int32, Int32) Initializes a new instance of the VisualStyleRenderer class using
the given class, part, and state values.

VisualStyleRenderer(VisualStyleElement)
VisualStyleRenderer(VisualStyleElement)
Initializes a new instance of the VisualStyleRenderer class using the given VisualStyleElement.
public VisualStyleRenderer (System.Windows.Forms.VisualStyles.VisualStyleElement element);
new System.Windows.Forms.VisualStyles.VisualStyleRenderer :
System.Windows.Forms.VisualStyles.VisualStyleElement ->
System.Windows.Forms.VisualStyles.VisualStyleRenderer

Parameters
element VisualStyleElement VisualStyleElement
A VisualStyleElement that this VisualStyleRenderer will represent.
Exceptions
InvalidOperationException InvalidOperationException
The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.
ArgumentException ArgumentException
element is not defined by the current visual style.
Examples
The following code example demonstrates how to use the VisualStyleRenderer(VisualStyleElement) constructor to
create a VisualStyleRenderer. This code example is part of a larger code example provided for the VisualStyleRenderer
class overview.
// Set the VisualStyleRenderer to a new element.
private bool SetRenderer(VisualStyleElement element)
{
if (!VisualStyleRenderer.IsElementDefined(element))
{
return false;
}

if (renderer == null)
{
renderer = new VisualStyleRenderer(element);
}
else
{
renderer.SetParameters(element);
}

return true;
}

Remarks
This constructor uses the VisualStyleElement.ClassName, VisualStyleElement.Part, and VisualStyleElement.State
properties of the element parameter to initialize the Class, Part, and State properties.
Before using this constructor, you should call the static IsElementDefined method to verify whether the current visual
style provides a definition for the element specified by the element parameter.

VisualStyleRenderer(String, Int32, Int32)


VisualStyleRenderer(String, Int32, Int32)
Initializes a new instance of the VisualStyleRenderer class using the given class, part, and state values.

public VisualStyleRenderer (string className, int part, int state);


new System.Windows.Forms.VisualStyles.VisualStyleRenderer : string * int * int ->
System.Windows.Forms.VisualStyles.VisualStyleRenderer

Parameters
className String String
The class name of the element that this VisualStyleRenderer will represent.
part Int32 Int32
The part of the element that this VisualStyleRenderer will represent.
state Int32 Int32
The state of the element that this VisualStyleRenderer will represent.
Exceptions
InvalidOperationException InvalidOperationException
The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.
ArgumentException ArgumentException
The combination of className , part , and state is not defined by the current visual style.
Remarks
This constructor uses the className , part , and state parameters to initialize the Class, Part, and State properties.

Before using this constructor, you should call the static IsElementDefined method to verify whether the current visual
style provides a definition for the element specified by the className , part , and state parameters.
VisualStyleState VisualStyleState Enum
Specifies how visual styles are applied to the current application.

D eclaration
public enum VisualStyleState
type VisualStyleState =

I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum

Remarks
This enumeration is used by the Application.VisualStyleState property to specify whether visual styles are applied to
client or nonclient areas of application windows.

Fields
ClientAndNonClientAreasEnabled Visual styles are applied to client and nonclient
ClientAndNonClientAreasEnabled areas.

ClientAreaEnabled ClientAreaEnabled Visual styles are applied only to the client area.

NonClientAreaEnabled NonClientAreaEnabled Visual styles are applied only to the nonclient


area.

NoneEnabled NoneEnabled Visual styles are not applied to the application.

You might also like