277 lines
19 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Type Name="ComboBoxRenderer" FullName="System.Windows.Forms.ComboBoxRenderer">
<TypeSignature Language="C#" Value="public sealed class ComboBoxRenderer" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Windows.Forms.ComboBoxRenderer" /> class provides a set of static methods that can be used to render a combo box control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a combo box, use the <see cref="Overload:System.Windows.Forms.ComboBoxRenderer.DrawTextBox" /> method to draw the text box and the <see cref="M:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.ComboBoxState)" /> method to draw the drop-down arrow. </para>
<para>If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, <see cref="Overload:System.Windows.Forms.ComboBoxRenderer.DrawTextBox" /> and <see cref="M:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.ComboBoxState)" /> will draw the combo box with the current visual style. Otherwise, these methods will throw an <see cref="T:System.InvalidOperationException" />. To determine whether the members of this class can be used, you can check the value of the <see cref="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" /> property.</para>
<para>This class wraps the functionality of a <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" /> that is set to one of the elements exposed by the <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement.ComboBox.DropDownButton" /> and <see cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox.TextEdit" /> classes. For more information, see <format type="text/html"><a href="a5b178ba-610e-46c4-a6c0-509c0886a744">Rendering Controls with Visual Styles</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides methods used to render a combo box control with visual styles. This class cannot be inherited.</para>
</summary>
</Docs>
<Members>
<Member MemberName="DrawDropDownButton">
<MemberSignature Language="C#" Value="public static void DrawDropDownButton (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Before calling this method, you should verify that the <see cref="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" /> property returns true.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Draws a drop-down arrow with the current visual style of the operating system.</para>
</summary>
<param name="g">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Graphics" /> used to draw the drop-down arrow.</param>
<param name="bounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the drop-down arrow.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the drop-down arrow.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Before calling this method, you should verify that the <see cref="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" /> property returns true.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Draws a text box in the specified state and bounds.</para>
</summary>
<param name="g">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Before calling this method, you should verify that the <see cref="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" /> property returns true.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Draws a text box in the specified state and bounds, with the specified text.</para>
</summary>
<param name="g">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Drawing.Rectangle textBounds, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="textBounds" Type="System.Drawing.Rectangle" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Before calling this method, you should verify that the <see cref="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" /> property returns true.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Draws a text box in the specified state and bounds, with the specified text and text bounds.</para>
</summary>
<param name="g">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="textBounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds in which to draw <paramref name="comboBoxText" />.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="flags" Type="System.Windows.Forms.TextFormatFlags" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Before calling this method, you should verify that the <see cref="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" /> property returns true.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Draws a text box in the specified state and bounds, with the specified text and text formatting.</para>
</summary>
<param name="g">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="flags">
<attribution license="cc4" from="Microsoft" modified="false" />A bitwise combination of the <see cref="T:System.Windows.Forms.TextFormatFlags" /> values.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Drawing.Rectangle textBounds, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="textBounds" Type="System.Drawing.Rectangle" />
<Parameter Name="flags" Type="System.Windows.Forms.TextFormatFlags" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Before calling this method, you should verify that the <see cref="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" /> property returns true.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Draws a text box in the specified state and bounds, with the specified text, text formatting, and text bounds.</para>
</summary>
<param name="g">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="textBounds">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds in which to draw <paramref name="comboBoxText" />.</param>
<param name="flags">
<attribution license="cc4" from="Microsoft" modified="false" />A bitwise combination of the <see cref="T:System.Windows.Forms.TextFormatFlags" /> values.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="IsSupported">
<MemberSignature Language="C#" Value="public static bool IsSupported { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If this property is false, the <see cref="Overload:System.Windows.Forms.ComboBoxRenderer.DrawTextBox" /> or <see cref="M:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.ComboBoxState)" /> methods will throw an <see cref="T:System.InvalidOperationException" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value indicating whether the <see cref="T:System.Windows.Forms.ComboBoxRenderer" /> class can be used to draw a combo box with visual styles.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>