Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1687 lines (1561 sloc) 130 KB
<Type Name="VisualStyleRenderer" FullName="System.Windows.Forms.VisualStyles.VisualStyleRenderer">
<TypeSignature Language="C#" Value="public sealed class VisualStyleRenderer" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed VisualStyleRenderer extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class VisualStyleRenderer" />
<TypeSignature Language="C++ CLI" Value="public ref class VisualStyleRenderer sealed" />
<TypeSignature Language="F#" Value="type VisualStyleRenderer = class" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides methods for drawing and getting information about a <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" />. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.VisualStyles?displayProperty=nameWithType> namespace exposes <xref:System.Windows.Forms.VisualStyles.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 <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> to the element you are interested in. A <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> is automatically set to a specified <xref:System.Windows.Forms.VisualStyles.VisualStyleElement> in the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.%23ctor%2A> constructor, but you can also set an existing <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> to a different element by calling the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.SetParameters%2A> method.
To draw an element, use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawBackground%2A> method. The <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class also includes methods, such as <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetColor%2A> and <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetEnumValue%2A>, that provide information about how an element is defined by the current visual style.
The <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.%23ctor%2A> constructor and many of the <xref:System.Windows.Forms.VisualStyles.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`<xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported%2A> property.
The <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class wraps the functionality of the visual styles (UxTheme) API from the Windows Shell portion of the Windows Platform SDK.
## Examples
The following code example uses the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class to implement a custom control that simulates some of the basic UI of a window, including dragging with the title bar, resizing with the sizing handle, and closing. This example uses several <xref:System.Windows.Forms.VisualStyles.VisualStyleElement> objects that represent standard parts of a window, including the elements exposed by the <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.Window.Caption>, <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.Window.CloseButton>, and <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.Status.Gripper> classes.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#0](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#0)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#0](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#0)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#0](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#0)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" />
<altmember cref="T:System.Windows.Forms.VisualStyles.VisualStyleInformation" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public VisualStyleRenderer (System.Windows.Forms.VisualStyles.VisualStyleElement element);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Windows.Forms.VisualStyles.VisualStyleElement element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.#ctor(System.Windows.Forms.VisualStyles.VisualStyleElement)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (element As VisualStyleElement)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; VisualStyleRenderer(System::Windows::Forms::VisualStyles::VisualStyleElement ^ element);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.VisualStyles.VisualStyleRenderer : System.Windows.Forms.VisualStyles.VisualStyleElement -&gt; System.Windows.Forms.VisualStyles.VisualStyleRenderer" Usage="new System.Windows.Forms.VisualStyles.VisualStyleRenderer element" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="element" Type="System.Windows.Forms.VisualStyles.VisualStyleElement" />
</Parameters>
<Docs>
<param name="element">A <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" /> that this <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> will represent.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> class using the given <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor uses the <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.ClassName%2A?displayProperty=nameWithType>, <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.Part%2A?displayProperty=nameWithType>, and <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.State%2A?displayProperty=nameWithType> properties of the `element` parameter to initialize the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class%2A>, <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part%2A>, and <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.State%2A> properties.
Before using this constructor, you should call the `static`<xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined%2A> method to verify whether the current visual style provides a definition for the element specified by the `element` parameter.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.%23ctor%28System.Windows.Forms.VisualStyles.VisualStyleElement%29> constructor to create a <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer>. This code example is part of a larger code example provided for the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class overview.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#40)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#40)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#40)]
]]></format>
</remarks>
<exception cref="T:System.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.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="element" /> is not defined by the current visual style.</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public VisualStyleRenderer (string className, int part, int state);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string className, int32 part, int32 state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.#ctor(System.String,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (className As String, part As Integer, state As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; VisualStyleRenderer(System::String ^ className, int part, int state);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.VisualStyles.VisualStyleRenderer : string * int * int -&gt; System.Windows.Forms.VisualStyles.VisualStyleRenderer" Usage="new System.Windows.Forms.VisualStyles.VisualStyleRenderer (className, part, state)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="className" Type="System.String" />
<Parameter Name="part" Type="System.Int32" />
<Parameter Name="state" Type="System.Int32" />
</Parameters>
<Docs>
<param name="className">The class name of the element that this <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> will represent.</param>
<param name="part">The part of the element that this <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> will represent.</param>
<param name="state">The state of the element that this <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> will represent.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> class using the given class, part, and state values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor uses the `className`, `part`, and `state` parameters to initialize the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class%2A>, <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part%2A>, and <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.State%2A> properties.
Before using this constructor, you should call the `static`<xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined%2A> method to verify whether the current visual style provides a definition for the element specified by the `className`, `part`, and `state` parameters.
]]></format>
</remarks>
<exception cref="T:System.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.</exception>
<exception cref="T:System.ArgumentException">The combination of <paramref name="className" />, <paramref name="part" />, and <paramref name="state" /> is not defined by the current visual style.</exception>
</Docs>
</Member>
<Member MemberName="Class">
<MemberSignature Language="C#" Value="public string Class { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Class" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Class As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Class { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Class : string" Usage="System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the class name of the current visual style element.</summary>
<value>A string that identifies the class of the current visual style element.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.VisualStyleElement> class.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="DrawBackground">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Draws the background image of the current visual style element.</summary>
</Docs>
</MemberGroup>
<Member MemberName="DrawBackground">
<MemberSignature Language="C#" Value="public void DrawBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawBackground(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawBackground(System.Drawing.IDeviceContext,System.Drawing.Rectangle)" />
<MemberSignature Language="VB.NET" Value="Public Sub DrawBackground (dc As IDeviceContext, bounds As Rectangle)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds);" />
<MemberSignature Language="F#" Value="member this.DrawBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle -&gt; unit" Usage="visualStyleRenderer.DrawBackground (dc, bounds)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> used to draw the background image.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which the background image is drawn.</param>
<summary>Draws the background image of the current visual style element within the specified bounding rectangle.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method draws the background of the current visual style element specified by the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class%2A>, <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part%2A>, and <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.State%2A> properties.
If the <xref:System.Drawing.Rectangle.Width%2A> or <xref:System.Drawing.Rectangle.Height%2A> of the rectangle specified by the `bounds` parameter is less than 0, the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawBackground%2A> 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 <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetEnumValue%2A> method with an argument value of <xref:System.Windows.Forms.VisualStyles.EnumProperty.BackgroundType?displayProperty=nameWithType>. To determine whether the element background will scale to fit the specified bounds, call the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetEnumValue%2A> method with an argument value of <xref:System.Windows.Forms.VisualStyles.EnumProperty.SizingType?displayProperty=nameWithType>.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawBackground%28System.Drawing.IDeviceContext%2CSystem.Drawing.Rectangle%29> method to a draw a <xref:System.Windows.Forms.VisualStyles.VisualStyleElement> within a custom control's <xref:System.Windows.Forms.Control.OnPaint%2A> method. This code example is part of a larger example provided for the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class overview.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#20](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#20)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#20](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#20)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#20](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#20)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="DrawBackground">
<MemberSignature Language="C#" Value="public void DrawBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, System.Drawing.Rectangle clipRectangle);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawBackground(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, valuetype System.Drawing.Rectangle clipRectangle) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawBackground(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.Drawing.Rectangle)" />
<MemberSignature Language="VB.NET" Value="Public Sub DrawBackground (dc As IDeviceContext, bounds As Rectangle, clipRectangle As Rectangle)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::Drawing::Rectangle clipRectangle);" />
<MemberSignature Language="F#" Value="member this.DrawBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Drawing.Rectangle -&gt; unit" Usage="visualStyleRenderer.DrawBackground (dc, bounds, clipRectangle)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="clipRectangle" Type="System.Drawing.Rectangle" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> used to draw the background image.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which the background image is drawn.</param>
<param name="clipRectangle">A <see cref="T:System.Drawing.Rectangle" /> that defines a clipping rectangle for the drawing operation.</param>
<summary>Draws the background image of the current visual style element within the specified bounding rectangle and clipped to the specified clipping rectangle.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method draws the background of the current visual style element specified by the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class%2A>, <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part%2A>, and <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.State%2A> properties. The background will be clipped to the area specified by the `clipRectangle` parameter.
If the <xref:System.Drawing.Rectangle.Width%2A> or <xref:System.Drawing.Rectangle.Height%2A> of the rectangle specified by either the `bounds` or `clipRectangle` parameters is less than 0, the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawBackground%2A> 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 <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetEnumValue%2A> method with an argument value of <xref:System.Windows.Forms.VisualStyles.EnumProperty.BackgroundType?displayProperty=nameWithType>. To determine whether the element background will scale to fit the specified bounds, call the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetEnumValue%2A> method with an argument value of <xref:System.Windows.Forms.VisualStyles.EnumProperty.SizingType?displayProperty=nameWithType>.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="DrawEdge">
<MemberSignature Language="C#" Value="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);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Rectangle DrawEdge(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, valuetype System.Windows.Forms.VisualStyles.Edges edges, valuetype System.Windows.Forms.VisualStyles.EdgeStyle style, valuetype System.Windows.Forms.VisualStyles.EdgeEffects effects) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawEdge(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.Edges,System.Windows.Forms.VisualStyles.EdgeStyle,System.Windows.Forms.VisualStyles.EdgeEffects)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; 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);" />
<MemberSignature Language="F#" Value="member this.DrawEdge : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.Edges * System.Windows.Forms.VisualStyles.EdgeStyle * System.Windows.Forms.VisualStyles.EdgeEffects -&gt; System.Drawing.Rectangle" Usage="visualStyleRenderer.DrawEdge (dc, bounds, edges, style, effects)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="edges" Type="System.Windows.Forms.VisualStyles.Edges" />
<Parameter Name="style" Type="System.Windows.Forms.VisualStyles.EdgeStyle" />
<Parameter Name="effects" Type="System.Windows.Forms.VisualStyles.EdgeEffects" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> used to draw the edges.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> whose bounds define the edges to draw.</param>
<param name="edges">A bitwise combination of the <see cref="T:System.Windows.Forms.VisualStyles.Edges" /> values.</param>
<param name="style">A bitwise combination of the <see cref="T:System.Windows.Forms.VisualStyles.EdgeStyle" /> values.</param>
<param name="effects">A bitwise combination of the <see cref="T:System.Windows.Forms.VisualStyles.EdgeEffects" /> values.</param>
<summary>Draws one or more edges of the specified bounding rectangle.</summary>
<returns>A <see cref="T:System.Drawing.Rectangle" /> that represents the interior of the <paramref name="bounds" /> parameter, minus the edges that were drawn.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<MemberGroup MemberName="DrawImage">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Draws the specified image within the specified bounding rectangle.</summary>
</Docs>
</MemberGroup>
<Member MemberName="DrawImage">
<MemberSignature Language="C#" Value="public void DrawImage (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Drawing.Image image);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawImage(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, class System.Drawing.Image image) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawImage(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Image)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawImage(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Drawing::Image ^ image);" />
<MemberSignature Language="F#" Value="member this.DrawImage : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Image -&gt; unit" Usage="visualStyleRenderer.DrawImage (g, bounds, image)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="image" Type="System.Drawing.Image" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the image.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which the image is drawn.</param>
<param name="image">The <see cref="T:System.Drawing.Image" /> to draw.</param>
<summary>Draws the specified image within the specified bounds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the visual style applies one of the effects specified by the <xref:System.Windows.Forms.VisualStyles.IconEffect?displayProperty=nameWithType> values to the current element, this method will apply the effect to the drawn image.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="g" /> or <paramref name="image" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="DrawImage">
<MemberSignature Language="C#" Value="public void DrawImage (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.ImageList imageList, int imageIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawImage(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, class System.Windows.Forms.ImageList imageList, int32 imageIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawImage(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.ImageList,System.Int32)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawImage(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::ImageList ^ imageList, int imageIndex);" />
<MemberSignature Language="F#" Value="member this.DrawImage : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.ImageList * int -&gt; unit" Usage="visualStyleRenderer.DrawImage (g, bounds, imageList, imageIndex)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="imageList" Type="System.Windows.Forms.ImageList" />
<Parameter Name="imageIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the image.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which the image is drawn.</param>
<param name="imageList">An <see cref="T:System.Windows.Forms.ImageList" /> that contains the <see cref="T:System.Drawing.Image" /> to draw.</param>
<param name="imageIndex">The index of the <see cref="T:System.Drawing.Image" /> within <paramref name="imageList" /> to draw.</param>
<summary>Draws the image from the specified <see cref="T:System.Windows.Forms.ImageList" /> within the specified bounds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the visual style applies one of the effects specified by the <xref:System.Windows.Forms.VisualStyles.IconEffect?displayProperty=nameWithType> values to the current element, this method will apply the effect to the drawn image.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="g" /> or <paramref name="image" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="imageIndex" /> is less than 0, or greater than or equal to the number of images in <paramref name="imageList" />.</exception>
</Docs>
</Member>
<Member MemberName="DrawParentBackground">
<MemberSignature Language="C#" Value="public void DrawParentBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, System.Windows.Forms.Control childControl);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawParentBackground(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, class System.Windows.Forms.Control childControl) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawParentBackground(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.Windows.Forms.Control)" />
<MemberSignature Language="VB.NET" Value="Public Sub DrawParentBackground (dc As IDeviceContext, bounds As Rectangle, childControl As Control)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawParentBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::Windows::Forms::Control ^ childControl);" />
<MemberSignature Language="F#" Value="member this.DrawParentBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Windows.Forms.Control -&gt; unit" Usage="visualStyleRenderer.DrawParentBackground (dc, bounds, childControl)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="childControl" Type="System.Windows.Forms.Control" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> used to draw the background of the parent of <paramref name="childControl" />. This object typically belongs to the child control.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which to draw the parent control's background. This rectangle should be inside the child control's bounds.</param>
<param name="childControl">The control whose parent's background will be drawn.</param>
<summary>Draws the background of a control's parent in the specified area.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<MemberGroup MemberName="DrawText">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Draws text in the specified bounds.</summary>
</Docs>
</MemberGroup>
<Member MemberName="DrawText">
<MemberSignature Language="C#" Value="public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawText(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, string textToDraw) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawText(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw);" />
<MemberSignature Language="F#" Value="member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string -&gt; unit" Usage="visualStyleRenderer.DrawText (dc, bounds, textToDraw)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="textToDraw" Type="System.String" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> used to draw the text.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which to draw the text.</param>
<param name="textToDraw">The text to draw.</param>
<summary>Draws text in the specified bounds using default formatting.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="DrawText">
<MemberSignature Language="C#" Value="public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawText(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawText(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, drawDisabled As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, bool drawDisabled);" />
<MemberSignature Language="F#" Value="member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool -&gt; unit" Usage="visualStyleRenderer.DrawText (dc, bounds, textToDraw, drawDisabled)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="textToDraw" Type="System.String" />
<Parameter Name="drawDisabled" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> used to draw the text.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which to draw the text.</param>
<param name="textToDraw">The text to draw.</param>
<param name="drawDisabled">
<see langword="true" /> to draw grayed-out text; otherwise, <see langword="false" />.</param>
<summary>Draws text in the specified bounds with the option of displaying disabled text.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="DrawText">
<MemberSignature Language="C#" Value="public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled, System.Windows.Forms.TextFormatFlags flags);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawText(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled, valuetype System.Windows.Forms.TextFormatFlags flags) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.DrawText(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.String,System.Boolean,System.Windows.Forms.TextFormatFlags)" />
<MemberSignature Language="VB.NET" Value="Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, drawDisabled As Boolean, flags As TextFormatFlags)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, bool drawDisabled, System::Windows::Forms::TextFormatFlags flags);" />
<MemberSignature Language="F#" Value="member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool * System.Windows.Forms.TextFormatFlags -&gt; unit" Usage="visualStyleRenderer.DrawText (dc, bounds, textToDraw, drawDisabled, flags)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="textToDraw" Type="System.String" />
<Parameter Name="drawDisabled" Type="System.Boolean" />
<Parameter Name="flags" Type="System.Windows.Forms.TextFormatFlags" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> used to draw the text.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> in which to draw the text.</param>
<param name="textToDraw">The text to draw.</param>
<param name="drawDisabled">
<see langword="true" /> to draw grayed-out text; otherwise, <see langword="false" />.</param>
<param name="flags">A bitwise combination of the <see cref="T:System.Windows.Forms.TextFormatFlags" /> values.</param>
<summary>Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text formatting.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="GetBackgroundContentRectangle">
<MemberSignature Language="C#" Value="public System.Drawing.Rectangle GetBackgroundContentRectangle (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Rectangle GetBackgroundContentRectangle(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetBackgroundContentRectangle(System.Drawing.IDeviceContext,System.Drawing.Rectangle)" />
<MemberSignature Language="VB.NET" Value="Public Function GetBackgroundContentRectangle (dc As IDeviceContext, bounds As Rectangle) As Rectangle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Rectangle GetBackgroundContentRectangle(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds);" />
<MemberSignature Language="F#" Value="member this.GetBackgroundContentRectangle : System.Drawing.IDeviceContext * System.Drawing.Rectangle -&gt; System.Drawing.Rectangle" Usage="visualStyleRenderer.GetBackgroundContentRectangle (dc, bounds)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> that contains the entire background area of the current visual style element.</param>
<summary>Returns the content area for the background of the current visual style element.</summary>
<returns>A <see cref="T:System.Drawing.Rectangle" /> that contains the content area for the background of the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="GetBackgroundExtent">
<MemberSignature Language="C#" Value="public System.Drawing.Rectangle GetBackgroundExtent (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle contentBounds);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Rectangle GetBackgroundExtent(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle contentBounds) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetBackgroundExtent(System.Drawing.IDeviceContext,System.Drawing.Rectangle)" />
<MemberSignature Language="VB.NET" Value="Public Function GetBackgroundExtent (dc As IDeviceContext, contentBounds As Rectangle) As Rectangle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Rectangle GetBackgroundExtent(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle contentBounds);" />
<MemberSignature Language="F#" Value="member this.GetBackgroundExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle -&gt; System.Drawing.Rectangle" Usage="visualStyleRenderer.GetBackgroundExtent (dc, contentBounds)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="contentBounds" Type="System.Drawing.Rectangle" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="contentBounds">A <see cref="T:System.Drawing.Rectangle" /> that contains the content area of the current visual style element.</param>
<summary>Returns the entire background area for the current visual style element.</summary>
<returns>A <see cref="T:System.Drawing.Rectangle" /> that contains the entire background area of the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="GetBackgroundRegion">
<MemberSignature Language="C#" Value="public System.Drawing.Region GetBackgroundRegion (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Drawing.Region GetBackgroundRegion(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetBackgroundRegion(System.Drawing.IDeviceContext,System.Drawing.Rectangle)" />
<MemberSignature Language="VB.NET" Value="Public Function GetBackgroundRegion (dc As IDeviceContext, bounds As Rectangle) As Region" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Region ^ GetBackgroundRegion(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds);" />
<MemberSignature Language="F#" Value="member this.GetBackgroundRegion : System.Drawing.IDeviceContext * System.Drawing.Rectangle -&gt; System.Drawing.Region" Usage="visualStyleRenderer.GetBackgroundRegion (dc, bounds)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.Security.SuppressUnmanagedCodeSecurity</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Region</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> that contains the entire background area of the current visual style element.</param>
<summary>Returns the region for the background of the current visual style element.</summary>
<returns>The <see cref="T:System.Drawing.Region" /> that contains the background of the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method can be used to get the <xref:System.Drawing.Region> of a visual style element that has partially transparent or alpha-blended parts in its background.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetBackgroundRegion%2A> method in a custom control. This example uses <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetBackgroundRegion%2A> to get the <xref:System.Drawing.Region> of the window title bar element returned by the <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.Window.Caption.Active%2A?displayProperty=nameWithType> property. This <xref:System.Drawing.Region> is used to set the <xref:System.Windows.Forms.Control.Region%2A?displayProperty=nameWithType> 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 <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class overview.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#30](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#30)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#30](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#30)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#30](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#30)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="GetBoolean">
<MemberSignature Language="C#" Value="public bool GetBoolean (System.Windows.Forms.VisualStyles.BooleanProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool GetBoolean(valuetype System.Windows.Forms.VisualStyles.BooleanProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetBoolean(System.Windows.Forms.VisualStyles.BooleanProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetBoolean (prop As BooleanProperty) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool GetBoolean(System::Windows::Forms::VisualStyles::BooleanProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetBoolean : System.Windows.Forms.VisualStyles.BooleanProperty -&gt; bool" Usage="visualStyleRenderer.GetBoolean prop" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.BooleanProperty" />
</Parameters>
<Docs>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.BooleanProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified Boolean property for the current visual style element.</summary>
<returns>
<see langword="true" /> if the property specified by the <paramref name="prop" /> parameter is <see langword="true" /> for the current visual style element; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.BooleanProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.BooleanProperty" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetColor">
<MemberSignature Language="C#" Value="public System.Drawing.Color GetColor (System.Windows.Forms.VisualStyles.ColorProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Color GetColor(valuetype System.Windows.Forms.VisualStyles.ColorProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetColor(System.Windows.Forms.VisualStyles.ColorProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetColor (prop As ColorProperty) As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Color GetColor(System::Windows::Forms::VisualStyles::ColorProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetColor : System.Windows.Forms.VisualStyles.ColorProperty -&gt; System.Drawing.Color" Usage="visualStyleRenderer.GetColor prop" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.ColorProperty" />
</Parameters>
<Docs>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.ColorProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified color property for the current visual style element.</summary>
<returns>A <see cref="T:System.Drawing.Color" /> that contains the value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.ColorProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.ColorProperty" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetEnumValue">
<MemberSignature Language="C#" Value="public int GetEnumValue (System.Windows.Forms.VisualStyles.EnumProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetEnumValue(valuetype System.Windows.Forms.VisualStyles.EnumProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetEnumValue(System.Windows.Forms.VisualStyles.EnumProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetEnumValue (prop As EnumProperty) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetEnumValue(System::Windows::Forms::VisualStyles::EnumProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetEnumValue : System.Windows.Forms.VisualStyles.EnumProperty -&gt; int" Usage="visualStyleRenderer.GetEnumValue prop" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.EnumProperty" />
</Parameters>
<Docs>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.EnumProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified enumerated type property for the current visual style element.</summary>
<returns>The integer value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.EnumProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.EnumProperty" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetFilename">
<MemberSignature Language="C#" Value="public string GetFilename (System.Windows.Forms.VisualStyles.FilenameProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetFilename(valuetype System.Windows.Forms.VisualStyles.FilenameProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetFilename(System.Windows.Forms.VisualStyles.FilenameProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetFilename (prop As FilenameProperty) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetFilename(System::Windows::Forms::VisualStyles::FilenameProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetFilename : System.Windows.Forms.VisualStyles.FilenameProperty -&gt; string" Usage="visualStyleRenderer.GetFilename prop" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.FilenameProperty" />
</Parameters>
<Docs>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.FilenameProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified file name property for the current visual style element.</summary>
<returns>A <see cref="T:System.String" /> that contains the value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.FilenameProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.FilenameProperty" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetFont">
<MemberSignature Language="C#" Value="public System.Drawing.Font GetFont (System.Drawing.IDeviceContext dc, System.Windows.Forms.VisualStyles.FontProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Drawing.Font GetFont(class System.Drawing.IDeviceContext dc, valuetype System.Windows.Forms.VisualStyles.FontProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetFont(System.Drawing.IDeviceContext,System.Windows.Forms.VisualStyles.FontProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetFont (dc As IDeviceContext, prop As FontProperty) As Font" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Font ^ GetFont(System::Drawing::IDeviceContext ^ dc, System::Windows::Forms::VisualStyles::FontProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetFont : System.Drawing.IDeviceContext * System.Windows.Forms.VisualStyles.FontProperty -&gt; System.Drawing.Font" Usage="visualStyleRenderer.GetFont (dc, prop)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Font</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.FontProperty" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.FontProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified font property for the current visual style element.</summary>
<returns>A <see cref="T:System.Drawing.Font" /> that contains the value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.FontProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.FontProperty" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetInteger">
<MemberSignature Language="C#" Value="public int GetInteger (System.Windows.Forms.VisualStyles.IntegerProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetInteger(valuetype System.Windows.Forms.VisualStyles.IntegerProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetInteger(System.Windows.Forms.VisualStyles.IntegerProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetInteger (prop As IntegerProperty) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetInteger(System::Windows::Forms::VisualStyles::IntegerProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetInteger : System.Windows.Forms.VisualStyles.IntegerProperty -&gt; int" Usage="visualStyleRenderer.GetInteger prop" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.IntegerProperty" />
</Parameters>
<Docs>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.IntegerProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified integer property for the current visual style element.</summary>
<returns>The integer value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.IntegerProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.IntegerProperty" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetMargins">
<MemberSignature Language="C#" Value="public System.Windows.Forms.Padding GetMargins (System.Drawing.IDeviceContext dc, System.Windows.Forms.VisualStyles.MarginProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Forms.Padding GetMargins(class System.Drawing.IDeviceContext dc, valuetype System.Windows.Forms.VisualStyles.MarginProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetMargins(System.Drawing.IDeviceContext,System.Windows.Forms.VisualStyles.MarginProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetMargins (dc As IDeviceContext, prop As MarginProperty) As Padding" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Forms::Padding GetMargins(System::Drawing::IDeviceContext ^ dc, System::Windows::Forms::VisualStyles::MarginProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetMargins : System.Drawing.IDeviceContext * System.Windows.Forms.VisualStyles.MarginProperty -&gt; System.Windows.Forms.Padding" Usage="visualStyleRenderer.GetMargins (dc, prop)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.Padding</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.MarginProperty" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.MarginProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified margins property for the current visual style element.</summary>
<returns>A <see cref="T:System.Windows.Forms.Padding" /> that contains the value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.MarginProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.MarginProperty" /> values.</exception>
</Docs>
</Member>
<MemberGroup MemberName="GetPartSize">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Returns the value of the specified size property of the current visual style part.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetPartSize">
<MemberSignature Language="C#" Value="public System.Drawing.Size GetPartSize (System.Drawing.IDeviceContext dc, System.Windows.Forms.VisualStyles.ThemeSizeType type);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Size GetPartSize(class System.Drawing.IDeviceContext dc, valuetype System.Windows.Forms.VisualStyles.ThemeSizeType type) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetPartSize(System.Drawing.IDeviceContext,System.Windows.Forms.VisualStyles.ThemeSizeType)" />
<MemberSignature Language="VB.NET" Value="Public Function GetPartSize (dc As IDeviceContext, type As ThemeSizeType) As Size" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Size GetPartSize(System::Drawing::IDeviceContext ^ dc, System::Windows::Forms::VisualStyles::ThemeSizeType type);" />
<MemberSignature Language="F#" Value="member this.GetPartSize : System.Drawing.IDeviceContext * System.Windows.Forms.VisualStyles.ThemeSizeType -&gt; System.Drawing.Size" Usage="visualStyleRenderer.GetPartSize (dc, type)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="type" Type="System.Windows.Forms.VisualStyles.ThemeSizeType" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="type">One of the <see cref="T:System.Windows.Forms.VisualStyles.ThemeSizeType" /> values that specifies which size value to retrieve for the part.</param>
<summary>Returns the value of the specified size property of the current visual style part.</summary>
<returns>A <see cref="T:System.Drawing.Size" /> that contains the size specified by the <paramref name="type" /> parameter for the current visual style part.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Typically, only the <xref:System.Windows.Forms.VisualStyles.ThemeSizeType.True> and <xref:System.Windows.Forms.VisualStyles.ThemeSizeType.Minimum> values should be used for the `type` parameter of this method.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetPartSize%28System.Drawing.IDeviceContext%2CSystem.Windows.Forms.VisualStyles.ThemeSizeType%29> 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 <xref:System.Drawing.Rectangle> objects used to draw the <xref:System.Windows.Forms.VisualStyles.VisualStyleElement> objects that represent these window parts. This code example is part of a larger example provided for the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class overview.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#10](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#10)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#10](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#10)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#10](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#10)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.ThemeSizeType" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetPartSize">
<MemberSignature Language="C#" Value="public System.Drawing.Size GetPartSize (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.ThemeSizeType type);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Size GetPartSize(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, valuetype System.Windows.Forms.VisualStyles.ThemeSizeType type) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetPartSize(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.ThemeSizeType)" />
<MemberSignature Language="VB.NET" Value="Public Function GetPartSize (dc As IDeviceContext, bounds As Rectangle, type As ThemeSizeType) As Size" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Size GetPartSize(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::ThemeSizeType type);" />
<MemberSignature Language="F#" Value="member this.GetPartSize : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.ThemeSizeType -&gt; System.Drawing.Size" Usage="visualStyleRenderer.GetPartSize (dc, bounds, type)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="type" Type="System.Windows.Forms.VisualStyles.ThemeSizeType" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> that contains the area in which the part will be drawn.</param>
<param name="type">One of the <see cref="T:System.Windows.Forms.VisualStyles.ThemeSizeType" /> values that specifies which size value to retrieve for the part.</param>
<summary>Returns the value of the specified size property of the current visual style part using the specified drawing bounds.</summary>
<returns>A <see cref="T:System.Drawing.Size" /> that contains the size specified by the <paramref name="type" /> parameter for the current visual style part.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.ThemeSizeType" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetPoint">
<MemberSignature Language="C#" Value="public System.Drawing.Point GetPoint (System.Windows.Forms.VisualStyles.PointProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Point GetPoint(valuetype System.Windows.Forms.VisualStyles.PointProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetPoint(System.Windows.Forms.VisualStyles.PointProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetPoint (prop As PointProperty) As Point" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Point GetPoint(System::Windows::Forms::VisualStyles::PointProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetPoint : System.Windows.Forms.VisualStyles.PointProperty -&gt; System.Drawing.Point" Usage="visualStyleRenderer.GetPoint prop" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Point</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.PointProperty" />
</Parameters>
<Docs>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.PointProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified point property for the current visual style element.</summary>
<returns>A <see cref="T:System.Drawing.Point" /> that contains the value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.PointProperty> values.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetPoint%2A> 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 <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class overview.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#10](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#10)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#10](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#10)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#10](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#10)]
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.PointProperty" /> values.</exception>
</Docs>
</Member>
<Member MemberName="GetString">
<MemberSignature Language="C#" Value="public string GetString (System.Windows.Forms.VisualStyles.StringProperty prop);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetString(valuetype System.Windows.Forms.VisualStyles.StringProperty prop) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetString(System.Windows.Forms.VisualStyles.StringProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetString (prop As StringProperty) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetString(System::Windows::Forms::VisualStyles::StringProperty prop);" />
<MemberSignature Language="F#" Value="member this.GetString : System.Windows.Forms.VisualStyles.StringProperty -&gt; string" Usage="visualStyleRenderer.GetString prop" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.Windows.Forms.VisualStyles.StringProperty" />
</Parameters>
<Docs>
<param name="prop">One of the <see cref="T:System.Windows.Forms.VisualStyles.StringProperty" /> values that specifies which property value to retrieve for the current visual style element.</param>
<summary>Returns the value of the specified string property for the current visual style element.</summary>
<returns>A <see cref="T:System.String" /> that contains the value of the property specified by the <paramref name="prop" /> parameter for the current visual style element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.StringProperty> values.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
<paramref name="prop" /> is not one of the <see cref="T:System.Windows.Forms.VisualStyles.StringProperty" /> values.</exception>
</Docs>
</Member>
<MemberGroup MemberName="GetTextExtent">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Returns the size and location of the specified string when drawn with the font of the current visual style element.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetTextExtent">
<MemberSignature Language="C#" Value="public System.Drawing.Rectangle GetTextExtent (System.Drawing.IDeviceContext dc, string textToDraw, System.Windows.Forms.TextFormatFlags flags);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Rectangle GetTextExtent(class System.Drawing.IDeviceContext dc, string textToDraw, valuetype System.Windows.Forms.TextFormatFlags flags) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetTextExtent(System.Drawing.IDeviceContext,System.String,System.Windows.Forms.TextFormatFlags)" />
<MemberSignature Language="VB.NET" Value="Public Function GetTextExtent (dc As IDeviceContext, textToDraw As String, flags As TextFormatFlags) As Rectangle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);" />
<MemberSignature Language="F#" Value="member this.GetTextExtent : System.Drawing.IDeviceContext * string * System.Windows.Forms.TextFormatFlags -&gt; System.Drawing.Rectangle" Usage="visualStyleRenderer.GetTextExtent (dc, textToDraw, flags)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="textToDraw" Type="System.String" />
<Parameter Name="flags" Type="System.Windows.Forms.TextFormatFlags" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="textToDraw">The string to measure.</param>
<param name="flags">A bitwise combination of the <see cref="T:System.Windows.Forms.TextFormatFlags" /> values.</param>
<summary>Returns the size and location of the specified string when drawn with the font of the current visual style element.</summary>
<returns>A <see cref="T:System.Drawing.Rectangle" /> that contains the area required to fit the rendered text.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="GetTextExtent">
<MemberSignature Language="C#" Value="public System.Drawing.Rectangle GetTextExtent (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, System.Windows.Forms.TextFormatFlags flags);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.Rectangle GetTextExtent(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle bounds, string textToDraw, valuetype System.Windows.Forms.TextFormatFlags flags) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetTextExtent(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.String,System.Windows.Forms.TextFormatFlags)" />
<MemberSignature Language="VB.NET" Value="Public Function GetTextExtent (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, flags As TextFormatFlags) As Rectangle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);" />
<MemberSignature Language="F#" Value="member this.GetTextExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * System.Windows.Forms.TextFormatFlags -&gt; System.Drawing.Rectangle" Usage="visualStyleRenderer.GetTextExtent (dc, bounds, textToDraw, flags)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="textToDraw" Type="System.String" />
<Parameter Name="flags" Type="System.Windows.Forms.TextFormatFlags" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="bounds">A <see cref="T:System.Drawing.Rectangle" /> used to control the flow and wrapping of the text.</param>
<param name="textToDraw">The string to measure.</param>
<param name="flags">A bitwise combination of the <see cref="T:System.Windows.Forms.TextFormatFlags" /> values.</param>
<summary>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.</summary>
<returns>A <see cref="T:System.Drawing.Rectangle" /> that contains the area required to fit the rendered text.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="GetTextMetrics">
<MemberSignature Language="C#" Value="public System.Windows.Forms.VisualStyles.TextMetrics GetTextMetrics (System.Drawing.IDeviceContext dc);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Forms.VisualStyles.TextMetrics GetTextMetrics(class System.Drawing.IDeviceContext dc) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetTextMetrics(System.Drawing.IDeviceContext)" />
<MemberSignature Language="VB.NET" Value="Public Function GetTextMetrics (dc As IDeviceContext) As TextMetrics" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Forms::VisualStyles::TextMetrics GetTextMetrics(System::Drawing::IDeviceContext ^ dc);" />
<MemberSignature Language="F#" Value="member this.GetTextMetrics : System.Drawing.IDeviceContext -&gt; System.Windows.Forms.VisualStyles.TextMetrics" Usage="visualStyleRenderer.GetTextMetrics dc" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.VisualStyles.TextMetrics</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<summary>Retrieves information about the font specified by the current visual style element.</summary>
<returns>A <see cref="T:System.Windows.Forms.VisualStyles.TextMetrics" /> that provides information about the font specified by the current visual style element.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="Handle">
<MemberSignature Language="C#" Value="public IntPtr Handle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int Handle" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Handle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Handle As IntPtr" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property IntPtr Handle { IntPtr get(); };" />
<MemberSignature Language="F#" Value="member this.Handle : nativeint" Usage="System.Windows.Forms.VisualStyles.VisualStyleRenderer.Handle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a unique identifier for the current class of visual style elements.</summary>
<value>An <see cref="T:System.IntPtr" /> that identifies a set of data that defines the class of elements specified by <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is used internally by the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> methods. If the class of elements specified by the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class%2A> property is not defined by the current visual style, then this property returns <xref:System.IntPtr.Zero?displayProperty=nameWithType>.
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 <xref:Microsoft.Win32.SystemEvents.UserPreferenceChanged?displayProperty=nameWithType> event is raised with the <xref:Microsoft.Win32.UserPreferenceChangedEventArgs.Category%2A?displayProperty=nameWithType> property value of <xref:Microsoft.Win32.UserPreferenceCategory.VisualStyle?displayProperty=nameWithType>.
]]></format>
</remarks>
<exception cref="T:System.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.</exception>
</Docs>
</Member>
<MemberGroup MemberName="HitTestBackground">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Determines whether a point is contained in the background of the current visual style element.</summary>
</Docs>
</MemberGroup>
<Member MemberName="HitTestBackground">
<MemberSignature Language="C#" Value="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);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle backgroundRectangle, valuetype System.Drawing.Point pt, valuetype System.Windows.Forms.VisualStyles.HitTestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.HitTestBackground(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.Drawing.Point,System.Windows.Forms.VisualStyles.HitTestOptions)" />
<MemberSignature Language="VB.NET" Value="Public Function HitTestBackground (dc As IDeviceContext, backgroundRectangle As Rectangle, pt As Point, options As HitTestOptions) As HitTestCode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Forms::VisualStyles::HitTestCode HitTestBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle backgroundRectangle, System::Drawing::Point pt, System::Windows::Forms::VisualStyles::HitTestOptions options);" />
<MemberSignature Language="F#" Value="member this.HitTestBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions -&gt; System.Windows.Forms.VisualStyles.HitTestCode" Usage="visualStyleRenderer.HitTestBackground (dc, backgroundRectangle, pt, options)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.VisualStyles.HitTestCode</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="backgroundRectangle" Type="System.Drawing.Rectangle" />
<Parameter Name="pt" Type="System.Drawing.Point" />
<Parameter Name="options" Type="System.Windows.Forms.VisualStyles.HitTestOptions" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="backgroundRectangle">A <see cref="T:System.Drawing.Rectangle" /> that contains the background of the current visual style element.</param>
<param name="pt">The <see cref="T:System.Drawing.Point" /> to test.</param>
<param name="options">A bitwise combination of the <see cref="T:System.Windows.Forms.VisualStyles.HitTestOptions" /> values.</param>
<summary>Returns a hit test code indicating whether a point is contained in the background of the current visual style element.</summary>
<returns>A <see cref="T:System.Windows.Forms.VisualStyles.HitTestCode" /> that describes where <paramref name="pt" /> is located in the background of the current visual style element.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="HitTestBackground">
<MemberSignature Language="C#" Value="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);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle backgroundRectangle, class System.Drawing.Region region, valuetype System.Drawing.Point pt, valuetype System.Windows.Forms.VisualStyles.HitTestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.HitTestBackground(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Region,System.Drawing.Point,System.Windows.Forms.VisualStyles.HitTestOptions)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; 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);" />
<MemberSignature Language="F#" Value="member this.HitTestBackground : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Region * System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions -&gt; System.Windows.Forms.VisualStyles.HitTestCode" Usage="visualStyleRenderer.HitTestBackground (g, backgroundRectangle, region, pt, options)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.VisualStyles.HitTestCode</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="backgroundRectangle" Type="System.Drawing.Rectangle" />
<Parameter Name="region" Type="System.Drawing.Region" />
<Parameter Name="pt" Type="System.Drawing.Point" />
<Parameter Name="options" Type="System.Windows.Forms.VisualStyles.HitTestOptions" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> this operation will use.</param>
<param name="backgroundRectangle">A <see cref="T:System.Drawing.Rectangle" /> that contains the background of the current visual style element.</param>
<param name="region">A <see cref="T:System.Drawing.Region" /> that specifies the bounds of the hit test area within the background.</param>
<param name="pt">The <see cref="T:System.Drawing.Point" /> to test.</param>
<param name="options">A bitwise combination of the <see cref="T:System.Windows.Forms.VisualStyles.HitTestOptions" /> values.</param>
<summary>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.</summary>
<returns>A <see cref="T:System.Windows.Forms.VisualStyles.HitTestCode" /> that describes where <paramref name="pt" /> is located in the background of the current visual style element, if at all.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="g" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="HitTestBackground">
<MemberSignature Language="C#" Value="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);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground(class System.Drawing.IDeviceContext dc, valuetype System.Drawing.Rectangle backgroundRectangle, native int hRgn, valuetype System.Drawing.Point pt, valuetype System.Windows.Forms.VisualStyles.HitTestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.HitTestBackground(System.Drawing.IDeviceContext,System.Drawing.Rectangle,System.IntPtr,System.Drawing.Point,System.Windows.Forms.VisualStyles.HitTestOptions)" />
<MemberSignature Language="VB.NET" Value="Public Function HitTestBackground (dc As IDeviceContext, backgroundRectangle As Rectangle, hRgn As IntPtr, pt As Point, options As HitTestOptions) As HitTestCode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; 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);" />
<MemberSignature Language="F#" Value="member this.HitTestBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * nativeint * System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions -&gt; System.Windows.Forms.VisualStyles.HitTestCode" Usage="visualStyleRenderer.HitTestBackground (dc, backgroundRectangle, hRgn, pt, options)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.VisualStyles.HitTestCode</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dc" Type="System.Drawing.IDeviceContext" />
<Parameter Name="backgroundRectangle" Type="System.Drawing.Rectangle" />
<Parameter Name="hRgn" Type="System.IntPtr" />
<Parameter Name="pt" Type="System.Drawing.Point" />
<Parameter Name="options" Type="System.Windows.Forms.VisualStyles.HitTestOptions" />
</Parameters>
<Docs>
<param name="dc">The <see cref="T:System.Drawing.IDeviceContext" /> this operation will use.</param>
<param name="backgroundRectangle">A <see cref="T:System.Drawing.Rectangle" /> that contains the background of the current visual style element.</param>
<param name="hRgn">A Windows handle to a <see cref="T:System.Drawing.Region" /> that specifies the bounds of the hit test area within the background.</param>
<param name="pt">The <see cref="T:System.Drawing.Point" /> to test.</param>
<param name="options">A bitwise combination of the <see cref="T:System.Windows.Forms.VisualStyles.HitTestOptions" /> values.</param>
<summary>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.</summary>
<returns>A <see cref="T:System.Windows.Forms.VisualStyles.HitTestCode" /> that describes where <paramref name="pt" /> is located in the background of the current visual style element.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dc" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="IsBackgroundPartiallyTransparent">
<MemberSignature Language="C#" Value="public bool IsBackgroundPartiallyTransparent ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool IsBackgroundPartiallyTransparent() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsBackgroundPartiallyTransparent" />
<MemberSignature Language="VB.NET" Value="Public Function IsBackgroundPartiallyTransparent () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool IsBackgroundPartiallyTransparent();" />
<MemberSignature Language="F#" Value="member this.IsBackgroundPartiallyTransparent : unit -&gt; bool" Usage="visualStyleRenderer.IsBackgroundPartiallyTransparent " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Indicates whether the background of the current visual style element has any semitransparent or alpha-blended pieces.</summary>
<returns>
<see langword="true" /> if the background of the current visual style element has any semitransparent or alpha-blended pieces; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsElementDefined">
<MemberSignature Language="C#" Value="public static bool IsElementDefined (System.Windows.Forms.VisualStyles.VisualStyleElement element);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool IsElementDefined(class System.Windows.Forms.VisualStyles.VisualStyleElement element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined(System.Windows.Forms.VisualStyles.VisualStyleElement)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function IsElementDefined (element As VisualStyleElement) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool IsElementDefined(System::Windows::Forms::VisualStyles::VisualStyleElement ^ element);" />
<MemberSignature Language="F#" Value="static member IsElementDefined : System.Windows.Forms.VisualStyles.VisualStyleElement -&gt; bool" Usage="System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined element" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.Forms.VisualStyles.VisualStyleElement" />
</Parameters>
<Docs>
<param name="element">A <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" /> whose class and part combination will be verified.</param>
<summary>Determines whether the specified visual style element is defined by the current visual style.</summary>
<returns>
<see langword="true" /> if the combination of the <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleElement.ClassName" /> and <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleElement.Part" /> properties of <paramref name="element" /> are defined; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method checks the value of the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported%2A> property internally.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined%2A> method to determine whether to initialize a <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> to a given <xref:System.Windows.Forms.VisualStyles.VisualStyleElement>. This code example is part of a larger example provided for the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class overview.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#40)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#40)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#40)]
]]></format>
</remarks>
<exception cref="T:System.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.</exception>
</Docs>
</Member>
<Member MemberName="IsSupported">
<MemberSignature Language="C#" Value="public static bool IsSupported { get; }" />
<MemberSignature Language="ILAsm" Value=".property bool IsSupported" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Property IsSupported As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property bool IsSupported { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsSupported : bool" Usage="System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value specifying whether the operating system is using visual styles to draw controls.</summary>
<value>
<see langword="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, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following table describes how to individually check for each of the three conditions that must exist for the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported%2A> property to return `true`.
|Condition|How to determine separately|
|---------------|---------------------------------|
|The operating system supports visual styles.|Verify that the <xref:System.Windows.Forms.VisualStyles.VisualStyleInformation.IsSupportedByOS%2A> property of the <xref:System.Windows.Forms.VisualStyles.VisualStyleInformation> class is `true`.|
|The user has enabled visual styles in the operating system.|Verify that the <xref:System.Windows.Forms.VisualStyles.VisualStyleInformation.IsEnabledByUser%2A> property of the <xref:System.Windows.Forms.VisualStyles.VisualStyleInformation> class is `true`.|
|Visual styles are being used to draw the client area of application windows.|Verify that the <xref:System.Windows.Forms.Application.VisualStyleState%2A> property of the <xref:System.Windows.Forms.Application> class has the value <xref:System.Windows.Forms.VisualStyles.VisualStyleState.ClientAreaEnabled?displayProperty=nameWithType> or <xref:System.Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled?displayProperty=nameWithType>.|
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="LastHResult">
<MemberSignature Language="C#" Value="public int LastHResult { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 LastHResult" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.LastHResult" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LastHResult As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int LastHResult { int get(); };" />
<MemberSignature Language="F#" Value="member this.LastHResult : int" Usage="System.Windows.Forms.VisualStyles.VisualStyleRenderer.LastHResult" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the last error code returned by the native visual styles (UxTheme) API methods encapsulated by the <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> class.</summary>
<value>A value specifying the last error code returned by the native visual styles API methods that this class encapsulates.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property gets the HRESULT value that was returned by the last native visual styles API method called by a member of the <xref:System.Windows.Forms.VisualStyles.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](https://msdn.microsoft.com/library/).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Part">
<MemberSignature Language="C#" Value="public int Part { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Part" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Part As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Part { int get(); };" />
<MemberSignature Language="F#" Value="member this.Part : int" Usage="System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the part of the current visual style element.</summary>
<value>A value that specifies the part of the current visual style element.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Windows.Forms.VisualStyles.VisualStyleElement> class.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="SetParameters">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Sets the current visual style element of this <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" />.</summary>
</Docs>
</MemberGroup>
<Member MemberName="SetParameters">
<MemberSignature Language="C#" Value="public void SetParameters (System.Windows.Forms.VisualStyles.VisualStyleElement element);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetParameters(class System.Windows.Forms.VisualStyles.VisualStyleElement element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.SetParameters(System.Windows.Forms.VisualStyles.VisualStyleElement)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetParameters (element As VisualStyleElement)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void SetParameters(System::Windows::Forms::VisualStyles::VisualStyleElement ^ element);" />
<MemberSignature Language="F#" Value="member this.SetParameters : System.Windows.Forms.VisualStyles.VisualStyleElement -&gt; unit" Usage="visualStyleRenderer.SetParameters element" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.Forms.VisualStyles.VisualStyleElement" />
</Parameters>
<Docs>
<param name="element">A <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" /> that specifies the new values of the <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class" />, <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part" />, and <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.State" /> properties.</param>
<summary>Sets this <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> to the visual style element represented by the specified <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method checks the value of the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported%2A> property internally. Before calling this method, you should call the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined%2A> method to verify that the current visual style provides a definition for the element specified by the `element` parameter.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.SetParameters%28System.Windows.Forms.VisualStyles.VisualStyleElement%29> method to set a <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> to a new <xref:System.Windows.Forms.VisualStyles.VisualStyleElement>. This code example is part of a larger example provided for the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer> class overview.
[!code-cpp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp#40)]
[!code-csharp[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/CS/form1.cs#40)]
[!code-vb[System.Windows.Forms.VisualStyles.VisualStyleRenderer#40](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/VB/form1.vb#40)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="element" /> is not defined by the current visual style.</exception>
<exception cref="T:System.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.</exception>
</Docs>
</Member>
<Member MemberName="SetParameters">
<MemberSignature Language="C#" Value="public void SetParameters (string className, int part, int state);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetParameters(string className, int32 part, int32 state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.VisualStyles.VisualStyleRenderer.SetParameters(System.String,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetParameters (className As String, part As Integer, state As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void SetParameters(System::String ^ className, int part, int state);" />
<MemberSignature Language="F#" Value="member this.SetParameters : string * int * int -&gt; unit" Usage="visualStyleRenderer.SetParameters (className, part, state)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="className" Type="System.String" />
<Parameter Name="part" Type="System.Int32" />
<Parameter Name="state" Type="System.Int32" />
</Parameters>
<Docs>
<param name="className">The new value of the <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class" /> property.</param>
<param name="part">The new value of the <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part" /> property.</param>
<param name="state">The new value of the <see cref="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.State" /> property.</param>
<summary>Sets this <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> to the visual style element represented by the specified class, part, and state values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method checks the value of the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported%2A> property internally. Before calling this method, you should call the <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined%2A> method to verify that the current visual style provides a definition for the element specified by the `className`, `part`, and `state` parameters.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The combination of <paramref name="className" />, <paramref name="part" />, and <paramref name="state" /> is not defined by the current visual style.</exception>
<exception cref="T:System.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.</exception>
</Docs>
</Member>
<Member MemberName="State">
<MemberSignature Language="C#" Value="public int State { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 State" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.VisualStyles.VisualStyleRenderer.State" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property State As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int State { int get(); };" />
<MemberSignature Language="F#" Value="member this.State : int" Usage="System.Windows.Forms.VisualStyles.VisualStyleRenderer.State" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the state of the current visual style element.</summary>
<value>A value that identifies the state of the current visual style element.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property identifies the current visual state of the element identified by the current <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Class%2A> and <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer.Part%2A> property values. For more information about the class, part, and state of a visual style element, see the <xref:System.Windows.Forms.VisualStyles.VisualStyleElement> class.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.