Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1441 lines (1321 sloc) 97.4 KB
<Type Name="Style" FullName="System.Web.UI.WebControls.Style">
<TypeSignature Language="C#" Value="public class Style : System.ComponentModel.Component, System.Web.UI.IStateManager" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Style extends System.ComponentModel.Component implements class System.Web.UI.IStateManager" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.Style" />
<TypeSignature Language="VB.NET" Value="Public Class Style&#xA;Inherits Component&#xA;Implements IStateManager" />
<TypeSignature Language="C++ CLI" Value="public ref class Style : System::ComponentModel::Component, System::Web::UI::IStateManager" />
<TypeSignature Language="F#" Value="type Style = class&#xA; inherit Component&#xA; interface IStateManager" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.Component</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.UI.IStateManager</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.ToolboxItem(false)</AttributeName>
</Attribute>
<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.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.EmptyStringExpandableObjectConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the style of a Web server control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Style> class encapsulates the properties that control the appearance of a Web server control and can be applied to multiple Web server controls to provide a common appearance. You can specify the background color and font color of a control by setting the <xref:System.Web.UI.WebControls.WebControl.BackColor%2A> and <xref:System.Web.UI.WebControls.WebControl.ForeColor%2A> properties, respectively. On controls that can display a border, you can control the border width, the border style, and the border color by setting the <xref:System.Web.UI.WebControls.WebControl.BorderWidth%2A>, <xref:System.Web.UI.WebControls.WebControl.BorderStyle%2A>, and <xref:System.Web.UI.WebControls.WebControl.BorderColor%2A> properties. The size of a Web server control can also be specified by using the <xref:System.Web.UI.WebControls.WebControl.Height%2A> and <xref:System.Web.UI.WebControls.WebControl.Width%2A> properties.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.Style.BackColor" />
<altmember cref="P:System.Web.UI.WebControls.Style.ForeColor" />
<altmember cref="P:System.Web.UI.WebControls.Style.BorderWidth" />
<altmember cref="P:System.Web.UI.WebControls.Style.BorderStyle" />
<altmember cref="P:System.Web.UI.WebControls.Style.BorderColor" />
<altmember cref="P:System.Web.UI.WebControls.Style.Height" />
<altmember cref="P:System.Web.UI.WebControls.Style.Width" />
<related type="Article" href="https://msdn.microsoft.com/library/5df3ebbd-d46c-4502-9406-02f9df4ef2c3">ASP.NET Themes Overview</related>
<related type="Article" href="https://msdn.microsoft.com/library/782c2db6-fc9b-4243-8df9-a8ffe2f4cc42">ASP.NET Web Server Controls and CSS Styles</related>
<related type="Article" href="https://msdn.microsoft.com/library/143d14d6-9d12-4d4b-ae60-f00e0eb6938f">ASP.NET Web Server Controls and Browser Capabilities</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.Style" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Style ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Style();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.Style" /> class using default values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this constructor to create and initialize a new instance of the <xref:System.Web.UI.WebControls.Style> class.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Style (System.Web.UI.StateBag bag);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Web.UI.StateBag bag) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.#ctor(System.Web.UI.StateBag)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (bag As StateBag)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Style(System::Web::UI::StateBag ^ bag);" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.Style : System.Web.UI.StateBag -&gt; System.Web.UI.WebControls.Style" Usage="new System.Web.UI.WebControls.Style bag" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="bag" Type="System.Web.UI.StateBag" />
</Parameters>
<Docs>
<param name="bag">A <see cref="T:System.Web.UI.StateBag" /> that represents the state bag in which to store style information.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.Style" /> class with the specified state bag information.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this constructor to create and initialize a new instance of the <xref:System.Web.UI.WebControls.Style> class using the <xref:System.Web.UI.StateBag?displayProperty=nameWithType> specified by the `bag` parameter.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.StateBag" />
</Docs>
</Member>
<MemberGroup MemberName="AddAttributesToRender">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Adds HTML attributes and styles that need to be rendered to the specified <see cref="T:System.Web.UI.HtmlTextWriter" />. This method is primarily used by control developers.</summary>
</Docs>
</MemberGroup>
<Member MemberName="AddAttributesToRender">
<MemberSignature Language="C#" Value="public void AddAttributesToRender (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddAttributesToRender(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.AddAttributesToRender(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddAttributesToRender (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void AddAttributesToRender(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="member this.AddAttributesToRender : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="style.AddAttributesToRender writer" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param>
<summary>Adds HTML attributes and styles that need to be rendered to the specified <see cref="T:System.Web.UI.HtmlTextWriter" />. This method is primarily used by control developers.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To render attributes and styles for a Web server control on the client, you typically call the <xref:System.Web.UI.HtmlTextWriter.AddAttribute%2A?displayProperty=nameWithType> and <xref:System.Web.UI.HtmlTextWriter.AddStyleAttribute%2A?displayProperty=nameWithType> methods to insert each attribute and style individually to the <xref:System.Web.UI.HtmlTextWriter?displayProperty=nameWithType> output stream. To simplify the process, this method encapsulates all calls to the <xref:System.Web.UI.HtmlTextWriter.AddAttribute%2A?displayProperty=nameWithType> and <xref:System.Web.UI.HtmlTextWriter.AddStyleAttribute%2A?displayProperty=nameWithType> methods for every attribute and style associated with the Web server control. All attributes and styles are inserted into the <xref:System.Web.UI.HtmlTextWriter?displayProperty=nameWithType> output stream in a single method call.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.HtmlTextWriter.AddAttribute(System.String,System.String)" />
<altmember cref="M:System.Web.UI.HtmlTextWriter.AddStyleAttribute(System.String,System.String)" />
<altmember cref="T:System.Web.UI.HtmlTextWriter" />
</Docs>
</Member>
<Member MemberName="AddAttributesToRender">
<MemberSignature Language="C#" Value="public virtual void AddAttributesToRender (System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.WebControl owner);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void AddAttributesToRender(class System.Web.UI.HtmlTextWriter writer, class System.Web.UI.WebControls.WebControl owner) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.AddAttributesToRender(System.Web.UI.HtmlTextWriter,System.Web.UI.WebControls.WebControl)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub AddAttributesToRender (writer As HtmlTextWriter, owner As WebControl)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void AddAttributesToRender(System::Web::UI::HtmlTextWriter ^ writer, System::Web::UI::WebControls::WebControl ^ owner);" />
<MemberSignature Language="F#" Value="abstract member AddAttributesToRender : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebControl -&gt; unit&#xA;override this.AddAttributesToRender : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebControl -&gt; unit" Usage="style.AddAttributesToRender (writer, owner)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
<Parameter Name="owner" Type="System.Web.UI.WebControls.WebControl" />
</Parameters>
<Docs>
<param name="writer">An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param>
<param name="owner">A <see cref="T:System.Web.UI.WebControls.WebControl" /> or <see cref="T:System.Web.UI.WebControls.WebControl" /> derived object that represents the Web server control associated with the <see cref="T:System.Web.UI.WebControls.Style" />.</param>
<summary>Adds HTML attributes and styles that need to be rendered to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> and Web server control. This method is primarily used by control developers.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To render attributes and styles for a Web server control on the client, you typically call the <xref:System.Web.UI.HtmlTextWriter.AddAttribute%2A?displayProperty=nameWithType> and <xref:System.Web.UI.HtmlTextWriter.AddStyleAttribute%2A?displayProperty=nameWithType> methods to insert each attribute and style individually to the <xref:System.Web.UI.HtmlTextWriter?displayProperty=nameWithType> output stream. To simplify the process, this method encapsulates all calls to the <xref:System.Web.UI.HtmlTextWriter.AddAttribute%2A?displayProperty=nameWithType> and <xref:System.Web.UI.HtmlTextWriter.AddStyleAttribute%2A?displayProperty=nameWithType> methods for every attribute and style associated with the Web Server control. All attributes and styles are inserted into the <xref:System.Web.UI.HtmlTextWriter?displayProperty=nameWithType> output stream in a single method call. This method is typically overridden by control developers in derived classes to insert the appropriate attributes and styles to the <xref:System.Web.UI.HtmlTextWriter?displayProperty=nameWithType> output stream for the class.
## Examples
The following example demonstrates how to create a class that derives from the <xref:System.Web.UI.WebControls.WebControl> class. The base implementation of the <xref:System.Web.UI.WebControls.WebControl.AddAttributesToRender%2A> method is overridden to add attributes appropriate to the derived class in the <xref:System.Web.UI.HtmlTextWriter?displayProperty=nameWithType> output stream.
[!code-csharp[WebControlAddAttributesToRender#1](~/samples/snippets/csharp/VS_Snippets_WebNet/WebControlAddAttributesToRender/CS/addattrib.cs#1)]
[!code-vb[WebControlAddAttributesToRender#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/WebControlAddAttributesToRender/VB/addattrib.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.HtmlTextWriter.AddAttribute(System.String,System.String)" />
<altmember cref="M:System.Web.UI.HtmlTextWriter.AddStyleAttribute(System.String,System.String)" />
<altmember cref="T:System.Web.UI.HtmlTextWriter" />
</Docs>
</Member>
<Member MemberName="BackColor">
<MemberSignature Language="C#" Value="public System.Drawing.Color BackColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color BackColor" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.BackColor" />
<MemberSignature Language="VB.NET" Value="Public Property BackColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Color BackColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberSignature Language="F#" Value="member this.BackColor : System.Drawing.Color with get, set" Usage="System.Web.UI.WebControls.Style.BackColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the background color of the Web server control.</summary>
<value>A <see cref="T:System.Drawing.Color" /> that represents the background color of the control. The default is <see cref="F:System.Drawing.Color.Empty" />, which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.BackColor%2A> property to specify the background color of the Web server control. This property is set using a <xref:System.Drawing.Color?displayProperty=nameWithType> object.
> [!NOTE]
> This property will render only for certain controls. For example, <xref:System.Web.UI.WebControls.Table>, <xref:System.Web.UI.WebControls.Panel>, <xref:System.Web.UI.WebControls.DataGrid>, <xref:System.Web.UI.WebControls.Calendar>, and <xref:System.Web.UI.WebControls.ValidationSummary> will render this property. It will also work for <xref:System.Web.UI.WebControls.CheckBoxList>, <xref:System.Web.UI.WebControls.RadioButtonList> and <xref:System.Web.UI.WebControls.DataList> if their `RepeatLayout` property is `RepeatLayout.Table`, and not `RepeatLayout.Flow`.
In general, only controls that render as a `<table>` tag can display a background color in HTML 3.2, whereas almost any control can in HTML 4.0.
For controls that render as a `<span>` tag (including <xref:System.Web.UI.WebControls.Label>, all validation controls, and list controls with their `RepeatLayout` property set to `RepeatLayout.Flow`), this property will work in Microsoft Internet Explorer version 5 or later, but not for Microsoft Internet Explorer version 4.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Color" />
<altmember cref="T:System.Web.UI.WebControls.Table" />
<altmember cref="T:System.Web.UI.WebControls.Panel" />
<altmember cref="T:System.Web.UI.WebControls.DataGrid" />
<altmember cref="T:System.Web.UI.WebControls.Calendar" />
<altmember cref="T:System.Web.UI.WebControls.ValidationSummary" />
<altmember cref="T:System.Web.UI.WebControls.CheckBoxList" />
<altmember cref="T:System.Web.UI.WebControls.RadioButtonList" />
<altmember cref="T:System.Web.UI.WebControls.DataList" />
<altmember cref="T:System.Web.UI.WebControls.RepeatLayout" />
</Docs>
</Member>
<Member MemberName="BorderColor">
<MemberSignature Language="C#" Value="public System.Drawing.Color BorderColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color BorderColor" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.BorderColor" />
<MemberSignature Language="VB.NET" Value="Public Property BorderColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Color BorderColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberSignature Language="F#" Value="member this.BorderColor : System.Drawing.Color with get, set" Usage="System.Web.UI.WebControls.Style.BorderColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the border color of the Web server control.</summary>
<value>A <see cref="T:System.Drawing.Color" /> that represents the border color of the control. The default is <see cref="F:System.Drawing.Color.Empty" />, which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.BorderColor%2A> property to specify the border color of the Web server control. This property is set using a <xref:System.Drawing.Color?displayProperty=nameWithType> object.
> [!NOTE]
> This property will render only for certain controls. For example, <xref:System.Web.UI.WebControls.Table>, <xref:System.Web.UI.WebControls.Panel>, <xref:System.Web.UI.WebControls.DataGrid>, <xref:System.Web.UI.WebControls.Calendar>, and <xref:System.Web.UI.WebControls.ValidationSummary> will render this property. It will also work for <xref:System.Web.UI.WebControls.CheckBoxList>, <xref:System.Web.UI.WebControls.RadioButtonList>, and <xref:System.Web.UI.WebControls.DataList> if their `RepeatLayout` property is `RepeatLayout.Table` and not `RepeatLayout.Flow`. However, it is rendered as the `bordercolor` attribute, which may not work in all browsers.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Color" />
<altmember cref="T:System.Web.UI.WebControls.Table" />
<altmember cref="T:System.Web.UI.WebControls.Panel" />
<altmember cref="T:System.Web.UI.WebControls.DataGrid" />
<altmember cref="T:System.Web.UI.WebControls.Calendar" />
<altmember cref="T:System.Web.UI.WebControls.ValidationSummary" />
<altmember cref="T:System.Web.UI.WebControls.CheckBoxList" />
<altmember cref="T:System.Web.UI.WebControls.RadioButtonList" />
<altmember cref="T:System.Web.UI.WebControls.DataList" />
<altmember cref="T:System.Web.UI.WebControls.RepeatLayout" />
</Docs>
</Member>
<Member MemberName="BorderStyle">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.BorderStyle BorderStyle { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.BorderStyle BorderStyle" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.BorderStyle" />
<MemberSignature Language="VB.NET" Value="Public Property BorderStyle As BorderStyle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::BorderStyle BorderStyle { System::Web::UI::WebControls::BorderStyle get(); void set(System::Web::UI::WebControls::BorderStyle value); };" />
<MemberSignature Language="F#" Value="member this.BorderStyle : System.Web.UI.WebControls.BorderStyle with get, set" Usage="System.Web.UI.WebControls.Style.BorderStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.BorderStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the border style of the Web server control.</summary>
<value>One of the <see cref="T:System.Web.UI.WebControls.BorderStyle" /> enumeration values. The default is <see langword="NotSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.BorderStyle%2A> property to specify the border style for the Web server control. This property is set using one of the <xref:System.Web.UI.WebControls.BorderStyle> enumeration values. The following table lists the possible values.
|Border Style|Description|
|------------------|-----------------|
|`NotSet`|The border style is not set.|
|`None`|No border|
|`Dotted`|A dotted line border.|
|`Dashed`|A dashed line border.|
|`Solid`|A solid line border.|
|`Double`|A solid double line border.|
|`Groove`|A grooved border for a sunken border appearance.|
|`Ridge`|A ridged border for a raised border appearance.|
|`Inset`|An inset border for a sunken control appearance.|
|`Outset`|An outset border for a raised control appearance.|
> [!NOTE]
> This property will not render on some browsers.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The selected value is not one of the <see cref="T:System.Web.UI.WebControls.BorderStyle" /> enumeration values.</exception>
<altmember cref="T:System.Web.UI.WebControls.BorderStyle" />
</Docs>
</Member>
<Member MemberName="BorderWidth">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.Unit BorderWidth { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.Unit BorderWidth" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.BorderWidth" />
<MemberSignature Language="VB.NET" Value="Public Property BorderWidth As Unit" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::Unit BorderWidth { System::Web::UI::WebControls::Unit get(); void set(System::Web::UI::WebControls::Unit value); };" />
<MemberSignature Language="F#" Value="member this.BorderWidth : System.Web.UI.WebControls.Unit with get, set" Usage="System.Web.UI.WebControls.Style.BorderWidth" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.Unit</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the border width of the Web server control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.Unit" /> that represents the border width of a Web server control. The default value is <see cref="F:System.Web.UI.WebControls.Unit.Empty" />, which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.BorderWidth%2A> property to specify a border width for a control.
> [!NOTE]
> This property does not work with all Web server controls. It only applies to controls that display as a table, such as <xref:System.Web.UI.WebControls.Table> and <xref:System.Web.UI.WebControls.DataGrid>.
This property is set with a <xref:System.Web.UI.WebControls.Unit> object. If the <xref:System.Web.UI.WebControls.Unit.Value%2A> property of the <xref:System.Web.UI.WebControls.Unit> contains a negative number, an exception is thrown.
> [!NOTE]
> The border width can only be expressed in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The specified border width is a negative value.</exception>
<altmember cref="T:System.Web.UI.WebControls.Unit" />
</Docs>
</Member>
<Member MemberName="CopyFrom">
<MemberSignature Language="C#" Value="public virtual void CopyFrom (System.Web.UI.WebControls.Style s);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CopyFrom(class System.Web.UI.WebControls.Style s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.CopyFrom(System.Web.UI.WebControls.Style)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub CopyFrom (s As Style)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void CopyFrom(System::Web::UI::WebControls::Style ^ s);" />
<MemberSignature Language="F#" Value="abstract member CopyFrom : System.Web.UI.WebControls.Style -&gt; unit&#xA;override this.CopyFrom : System.Web.UI.WebControls.Style -&gt; unit" Usage="style.CopyFrom s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.Web.UI.WebControls.Style" />
</Parameters>
<Docs>
<param name="s">A <see cref="T:System.Web.UI.WebControls.Style" /> that represents the style to copy.</param>
<summary>Duplicates the style properties of the specified <see cref="T:System.Web.UI.WebControls.Style" /> into the instance of the <see cref="T:System.Web.UI.WebControls.Style" /> class that this method is called from.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.CopyFrom%2A> method to duplicate the style properties of the specified <xref:System.Web.UI.WebControls.Style> into the instance of the <xref:System.Web.UI.WebControls.Style> class that this method is called from.
When a style is registered using <xref:System.Web.UI.IStyleSheet.RegisterStyle%2A>, and then copied using <xref:System.Web.UI.WebControls.Style.CopyFrom%28System.Web.UI.WebControls.Style%29?displayProperty=nameWithType>, only the <xref:System.Web.UI.WebControls.Style.CssClass%2A> property is copied to the destination, not all the individual properties. This could lead to unexpected results if you then copy or examine the properties of the destination style. For example, if you are using <xref:System.Web.UI.WebControls.FontInfo.CopyFrom%28System.Web.UI.WebControls.FontInfo%29?displayProperty=nameWithType> to copy font information from the <xref:System.Web.UI.WebControls.Style.Font%2A> property of a <xref:System.Web.UI.WebControls.Style> that is registered, you will not get the individual settings of the font from the style.
> [!CAUTION]
> All properties, including those that have been set in the current instance of the <xref:System.Web.UI.WebControls.Style> class, will be replaced by the associated property in the <xref:System.Web.UI.WebControls.Style> specified by the `s` parameter.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<see cref="P:System.Web.UI.WebControls.Style.RegisteredCssClass" /> has been set.</exception>
<altmember cref="M:System.Web.UI.WebControls.Style.MergeWith(System.Web.UI.WebControls.Style)" />
</Docs>
</Member>
<Member MemberName="CssClass">
<MemberSignature Language="C#" Value="public string CssClass { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CssClass" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.CssClass" />
<MemberSignature Language="VB.NET" Value="Public Property CssClass As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ CssClass { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.CssClass : string with get, set" Usage="System.Web.UI.WebControls.Style.CssClass" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<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.Web.UI.CssClassProperty</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the cascading style sheet (CSS) class rendered by the Web server control on the client.</summary>
<value>The CSS class rendered by the Web server control on the client. The default is <see cref="F:System.String.Empty" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.CssClass%2A> property to specify the CSS class to render on the client for the Web server control. This property will render on browsers for all controls. It will always be rendered as the `class` attribute, regardless of the browser.
For example, suppose you have the following Web server control declaration:
```
<asp:TextBox id="TextBox1" ForeColor="Red" CssClass="class1" />
```
The following HTML is rendered on the client for the previous Web server control declaration:
```
<input type=text class="class1" style="ForeColor:red">
```
> [!NOTE]
> On browsers that do not support CSS, setting the <xref:System.Web.UI.WebControls.Style.CssClass%2A> property will have no effect.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="FillStyleAttributes">
<MemberSignature Language="C#" Value="protected virtual void FillStyleAttributes (System.Web.UI.CssStyleCollection attributes, System.Web.UI.IUrlResolutionService urlResolver);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void FillStyleAttributes(class System.Web.UI.CssStyleCollection attributes, class System.Web.UI.IUrlResolutionService urlResolver) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.FillStyleAttributes(System.Web.UI.CssStyleCollection,System.Web.UI.IUrlResolutionService)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub FillStyleAttributes (attributes As CssStyleCollection, urlResolver As IUrlResolutionService)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void FillStyleAttributes(System::Web::UI::CssStyleCollection ^ attributes, System::Web::UI::IUrlResolutionService ^ urlResolver);" />
<MemberSignature Language="F#" Value="abstract member FillStyleAttributes : System.Web.UI.CssStyleCollection * System.Web.UI.IUrlResolutionService -&gt; unit&#xA;override this.FillStyleAttributes : System.Web.UI.CssStyleCollection * System.Web.UI.IUrlResolutionService -&gt; unit" Usage="style.FillStyleAttributes (attributes, urlResolver)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="attributes" Type="System.Web.UI.CssStyleCollection" Index="0" 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" />
<Parameter Name="urlResolver" Type="System.Web.UI.IUrlResolutionService" Index="1" 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" />
</Parameters>
<Docs>
<param name="attributes">The <see cref="T:System.Web.UI.CssStyleCollection" /> object to which to add the style properties.</param>
<param name="urlResolver">A <see cref="T:System.Web.UI.IUrlResolutionService" /> -implemented object that contains the context information for the current location (URL).</param>
<summary>Adds the specified object's style properties to a <see cref="T:System.Web.UI.CssStyleCollection" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.FillStyleAttributes%2A> method to add the style properties of an object to the specified <xref:System.Web.UI.CssStyleCollection?displayProperty=nameWithType> object. The object that you specify must implement <xref:System.Web.UI.IUrlResolutionService?displayProperty=nameWithType>. All classes derived from <xref:System.Web.UI.Control> implement <xref:System.Web.UI.IUrlResolutionService?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.CssStyleCollection" />
<altmember cref="T:System.Web.UI.IUrlResolutionService" />
</Docs>
</Member>
<Member MemberName="Font">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.FontInfo Font { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.FontInfo Font" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.Font" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Font As FontInfo" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::FontInfo ^ Font { System::Web::UI::WebControls::FontInfo ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Font : System.Web.UI.WebControls.FontInfo" Usage="System.Web.UI.WebControls.Style.Font" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.FontInfo</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the font properties associated with the Web server control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.FontInfo" /> that represents the font properties of the Web server control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.Font%2A> property to specify the font properties of the Web server control. This property includes subproperties that can be accessed declaratively in the form of `Property-Subproperty` (for example `Font-Bold`) or programmatically in the form of `Property.Subproperty` (for example `Font.Bold`).
All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: <xref:System.Web.UI.WebControls.FontInfo.Bold%2A>, <xref:System.Web.UI.WebControls.FontInfo.Italic%2A>, <xref:System.Web.UI.WebControls.FontInfo.Name%2A>, <xref:System.Web.UI.WebControls.FontInfo.Names%2A>, <xref:System.Web.UI.WebControls.FontInfo.Strikeout%2A>, <xref:System.Web.UI.WebControls.FontInfo.Underline%2A>, and <xref:System.Web.UI.WebControls.FontInfo.Size%2A> (but only named font sizes, such as `Small`, `Smaller`, and so on, will work).
> [!NOTE]
> Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than in later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as `<b>` and `<font>`.
One subproperty that will not render on some browsers is <xref:System.Web.UI.WebControls.FontInfo.Overline%2A>.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.FontInfo" />
</Docs>
</Member>
<Member MemberName="ForeColor">
<MemberSignature Language="C#" Value="public System.Drawing.Color ForeColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color ForeColor" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.ForeColor" />
<MemberSignature Language="VB.NET" Value="Public Property ForeColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Color ForeColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberSignature Language="F#" Value="member this.ForeColor : System.Drawing.Color with get, set" Usage="System.Web.UI.WebControls.Style.ForeColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the foreground color (typically the color of the text) of the Web server control.</summary>
<value>A <see cref="T:System.Drawing.Color" /> that represents the foreground color of the control. The default is <see cref="F:System.Drawing.Color.Empty" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.ForeColor%2A> property to specify the foreground color of the Web server control. The foreground color is usually the color of the text. This property will render on browsers earlier than Microsoft Internet Explorer version 4 for all controls, except the <xref:System.Web.UI.WebControls.Image>, <xref:System.Web.UI.WebControls.AdRotator>, <xref:System.Web.UI.WebControls.HyperLink> and <xref:System.Web.UI.WebControls.LinkButton>.
> [!NOTE]
> On browsers that do not support styles, this property is rendered as a FONT element.
## Examples
This example demonstrates how to use a <xref:System.Web.UI.WebControls.Style> object to change the style properties of multiple controls at once. Each time one of the <xref:System.Web.UI.WebControls.Style> property values changes, each control must call its <xref:System.Web.UI.WebControls.WebControl.ApplyStyle%2A> method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[StyleClass#1](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#1)]
[!code-aspx-vb[StyleClass#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#1)]
[!code-aspx-csharp[StyleClass#3](~/samples/snippets/csharp/VS_Snippets_WebNet/StyleClass/CS/styleclasscs.aspx#3)]
[!code-aspx-vb[StyleClass#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/StyleClass/VB/styleclassvb.aspx#3)]
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Color" />
</Docs>
</Member>
<Member MemberName="GetStyleAttributes">
<MemberSignature Language="C#" Value="public System.Web.UI.CssStyleCollection GetStyleAttributes (System.Web.UI.IUrlResolutionService urlResolver);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.CssStyleCollection GetStyleAttributes(class System.Web.UI.IUrlResolutionService urlResolver) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.GetStyleAttributes(System.Web.UI.IUrlResolutionService)" />
<MemberSignature Language="VB.NET" Value="Public Function GetStyleAttributes (urlResolver As IUrlResolutionService) As CssStyleCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Web::UI::CssStyleCollection ^ GetStyleAttributes(System::Web::UI::IUrlResolutionService ^ urlResolver);" />
<MemberSignature Language="F#" Value="member this.GetStyleAttributes : System.Web.UI.IUrlResolutionService -&gt; System.Web.UI.CssStyleCollection" Usage="style.GetStyleAttributes urlResolver" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.CssStyleCollection</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="urlResolver" Type="System.Web.UI.IUrlResolutionService" Index="0" 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" />
</Parameters>
<Docs>
<param name="urlResolver">A <see cref="T:System.Web.UI.IUrlResolutionService" />-implemented object that contains the context information for the current location (URL).</param>
<summary>Retrieves the <see cref="T:System.Web.UI.CssStyleCollection" /> object for the specified <see cref="T:System.Web.UI.IUrlResolutionService" />-implemented object.</summary>
<returns>A <see cref="T:System.Web.UI.CssStyleCollection" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.GetStyleAttributes%2A> method to retrieve the <xref:System.Web.UI.CssStyleCollection?displayProperty=nameWithType> object for a specified <xref:System.Web.UI.IUrlResolutionService?displayProperty=nameWithType>-implemented object. All classes derived from <xref:System.Web.UI.Control> implement <xref:System.Web.UI.IUrlResolutionService?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.CssStyleCollection" />
<altmember cref="T:System.Web.UI.IUrlResolutionService" />
</Docs>
</Member>
<Member MemberName="Height">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.Unit Height { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.Unit Height" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.Height" />
<MemberSignature Language="VB.NET" Value="Public Property Height As Unit" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::Unit Height { System::Web::UI::WebControls::Unit get(); void set(System::Web::UI::WebControls::Unit value); };" />
<MemberSignature Language="F#" Value="member this.Height : System.Web.UI.WebControls.Unit with get, set" Usage="System.Web.UI.WebControls.Style.Height" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.Unit</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the height of the Web server control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.Unit" /> that represents the height of the Web server control. The default is <see cref="F:System.Web.UI.WebControls.Unit.Empty" />, which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.Height%2A> property to specify or determine the height of the Web server control. This property is set with a <xref:System.Web.UI.WebControls.Unit>.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <see cref="P:System.Web.UI.WebControls.Unit.Value" /> property of the <see cref="T:System.Web.UI.WebControls.Unit" /> is negative.</exception>
<altmember cref="T:System.Web.UI.WebControls.Unit" />
</Docs>
</Member>
<Member MemberName="IsEmpty">
<MemberSignature Language="C#" Value="protected internal virtual bool IsEmpty { get; }" FrameworkAlternate="netframework-1.1" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsEmpty" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.IsEmpty" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable ReadOnly Property IsEmpty As Boolean" FrameworkAlternate="netframework-1.1" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property bool IsEmpty { bool get(); };" FrameworkAlternate="netframework-1.1" />
<MemberSignature Language="F#" Value="member this.IsEmpty : bool" Usage="System.Web.UI.WebControls.Style.IsEmpty" />
<MemberSignature Language="C#" Value="public virtual bool IsEmpty { get; }" 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" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property IsEmpty As Boolean" 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" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsEmpty { bool get(); };" 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" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<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.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>A protected property. Gets a value indicating whether any style elements have been defined in the state bag.</summary>
<value>
<see langword="true" /> if the state bag has no style elements defined; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsTrackingViewState">
<MemberSignature Language="C#" Value="protected bool IsTrackingViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsTrackingViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.IsTrackingViewState" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property IsTrackingViewState As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property bool IsTrackingViewState { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsTrackingViewState : bool" Usage="System.Web.UI.WebControls.Style.IsTrackingViewState" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Web.UI.IStateManager.IsTrackingViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns a value indicating whether any style elements have been defined in the state bag.</summary>
<value>
<see langword="true" /> if there are style elements defined in the state bag; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.IsTrackingViewState%2A> property to determine whether any style elements have been defined in the state bag. This property is primarily used by control developers.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="LoadViewState">
<MemberSignature Language="C#" Value="protected internal void LoadViewState (object state);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance void LoadViewState(object state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.LoadViewState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub LoadViewState (state As Object)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; void LoadViewState(System::Object ^ state);" />
<MemberSignature Language="F#" Value="member this.LoadViewState : obj -&gt; unit" Usage="style.LoadViewState state" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.LoadViewState(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="state" Type="System.Object" />
</Parameters>
<Docs>
<param name="state">The previously saved state.</param>
<summary>Loads the previously saved state.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MergeWith">
<MemberSignature Language="C#" Value="public virtual void MergeWith (System.Web.UI.WebControls.Style s);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void MergeWith(class System.Web.UI.WebControls.Style s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.MergeWith(System.Web.UI.WebControls.Style)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub MergeWith (s As Style)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void MergeWith(System::Web::UI::WebControls::Style ^ s);" />
<MemberSignature Language="F#" Value="abstract member MergeWith : System.Web.UI.WebControls.Style -&gt; unit&#xA;override this.MergeWith : System.Web.UI.WebControls.Style -&gt; unit" Usage="style.MergeWith s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.Web.UI.WebControls.Style" />
</Parameters>
<Docs>
<param name="s">A <see cref="T:System.Web.UI.WebControls.Style" /> that represents the style to combine.</param>
<summary>Combines the style properties of the specified <see cref="T:System.Web.UI.WebControls.Style" /> with the instance of the <see cref="T:System.Web.UI.WebControls.Style" /> class that this method is called from.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.MergeWith%2A> method to combine the style properties of the specified <xref:System.Web.UI.WebControls.Style> with the instance of the <xref:System.Web.UI.WebControls.Style> class that this method is called from.
> [!CAUTION]
> All properties, except those that have already been set on the current instance of the Style class, will be replaced by the corresponding property of the <xref:System.Web.UI.WebControls.Style> specified by the `s` parameter.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<see cref="P:System.Web.UI.WebControls.Style.RegisteredCssClass" /> has been set.</exception>
<altmember cref="M:System.Web.UI.WebControls.Style.CopyFrom(System.Web.UI.WebControls.Style)" />
</Docs>
</Member>
<Member MemberName="RegisteredCssClass">
<MemberSignature Language="C#" Value="public string RegisteredCssClass { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string RegisteredCssClass" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.RegisteredCssClass" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property RegisteredCssClass As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ RegisteredCssClass { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.RegisteredCssClass : string" Usage="System.Web.UI.WebControls.Style.RegisteredCssClass" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</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.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<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.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<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.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the cascading style sheet (CSS) class that is registered with the control.</summary>
<value>The CSS class name with which the current instance was registered on the page.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.RegisteredCssClass%2A> property to retrieve the CSS class that is registered with the control.
A style is registered on the current page with a <xref:System.Web.UI.IStyleSheet.RegisterStyle%2A> method, which looks for a `<head runat="server"``>` element on the page where the properties in the current instance are placed in an embedded style sheet, represented by a `<style>` element, under a class name unique to the associated control.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Reset">
<MemberSignature Language="C#" Value="public virtual void Reset ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Reset() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.Reset" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Reset ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Reset();" />
<MemberSignature Language="F#" Value="abstract member Reset : unit -&gt; unit&#xA;override this.Reset : unit -&gt; unit" Usage="style.Reset " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes any defined style elements from the state bag.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to remove any defined style elements from the state bag.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SaveViewState">
<MemberSignature Language="C#" Value="protected internal virtual object SaveViewState ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance object SaveViewState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.SaveViewState" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Function SaveViewState () As Object" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual System::Object ^ SaveViewState();" />
<MemberSignature Language="F#" Value="abstract member SaveViewState : unit -&gt; obj&#xA;override this.SaveViewState : unit -&gt; obj" Usage="style.SaveViewState " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.SaveViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>A protected method. Saves any state that has been modified after the <see cref="M:System.Web.UI.WebControls.Style.TrackViewState" /> method was invoked.</summary>
<returns>An object that represents the saved state. The default is <see langword="null" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetBit">
<MemberSignature Language="C#" Value="protected internal virtual void SetBit (int bit);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance void SetBit(int32 bit) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.SetBit(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Sub SetBit (bit As Integer)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual void SetBit(int bit);" />
<MemberSignature Language="F#" Value="abstract member SetBit : int -&gt; unit&#xA;override this.SetBit : int -&gt; unit" Usage="style.SetBit bit" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bit" Type="System.Int32" />
</Parameters>
<Docs>
<param name="bit">A bitmask value.</param>
<summary>A protected internal method. Sets an internal bitmask field that indicates the style properties that are stored in the state bag.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetDirty">
<MemberSignature Language="C#" Value="public void SetDirty ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetDirty() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.SetDirty" />
<MemberSignature Language="VB.NET" Value="Public Sub SetDirty ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void SetDirty();" />
<MemberSignature Language="F#" Value="member this.SetDirty : unit -&gt; unit" Usage="style.SetDirty " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Marks the <see cref="T:System.Web.UI.WebControls.Style" /> so that its state will be recorded in view state.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Style.SetDirty%2A> method is called directly by the <xref:System.Web.UI.WebControls.StyleCollection.SetDirtyObject%2A> method of a <xref:System.Web.UI.WebControls.StyleCollection>, to mark a <xref:System.Web.UI.WebControls.Style> object so that its state is recorded in view state.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.IsTrackingViewState">
<MemberSignature Language="C#" Value="bool System.Web.UI.IStateManager.IsTrackingViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Web.UI.IStateManager.IsTrackingViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.System#Web#UI#IStateManager#IsTrackingViewState" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsTrackingViewState As Boolean Implements IStateManager.IsTrackingViewState" />
<MemberSignature Language="C++ CLI" Value="property bool System::Web::UI::IStateManager::IsTrackingViewState { bool get(); };" />
<MemberSignature Language="F#" Usage="System.Web.UI.IStateManager.IsTrackingViewState" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Web.UI.IStateManager.IsTrackingViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</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.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether a server control is tracking its view state changes.</summary>
<value>
<see langword="true" /> if there are style elements defined in the view state bag; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.WebControls.Style> instance is cast to an <xref:System.Web.UI.IStateManager> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.LoadViewState">
<MemberSignature Language="C#" Value="void IStateManager.LoadViewState (object state);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Web.UI.IStateManager.LoadViewState(object state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.System#Web#UI#IStateManager#LoadViewState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub LoadViewState (state As Object) Implements IStateManager.LoadViewState" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Web.UI.IStateManager.LoadViewState(System::Object ^ state) = System::Web::UI::IStateManager::LoadViewState;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.LoadViewState(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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="state" Type="System.Object" />
</Parameters>
<Docs>
<param name="state">The previously saved state.</param>
<summary>Loads the previously saved state.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.WebControls.Style> instance is cast to an <xref:System.Web.UI.IStateManager> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.SaveViewState">
<MemberSignature Language="C#" Value="object IStateManager.SaveViewState ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance object System.Web.UI.IStateManager.SaveViewState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.System#Web#UI#IStateManager#SaveViewState" />
<MemberSignature Language="VB.NET" Value="Function SaveViewState () As Object Implements IStateManager.SaveViewState" />
<MemberSignature Language="C++ CLI" Value=" virtual System::Object ^ System.Web.UI.IStateManager.SaveViewState() = System::Web::UI::IStateManager::SaveViewState;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.SaveViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the object containing state changes.</summary>
<returns>An object that represents the saved state. The default is <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.WebControls.Style> instance is cast to an <xref:System.Web.UI.IStateManager> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.TrackViewState">
<MemberSignature Language="C#" Value="void IStateManager.TrackViewState ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Web.UI.IStateManager.TrackViewState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.System#Web#UI#IStateManager#TrackViewState" />
<MemberSignature Language="VB.NET" Value="Sub TrackViewState () Implements IStateManager.TrackViewState" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Web.UI.IStateManager.TrackViewState() = System::Web::UI::IStateManager::TrackViewState;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.TrackViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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 />
<Docs>
<summary>Starts tracking state changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Web.UI.WebControls.Style> instance is cast to an <xref:System.Web.UI.IStateManager> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::String ^ ToString();" />
<MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="style.ToString " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a string that represents the current object.</summary>
<returns>A string that represents the current object.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TrackViewState">
<MemberSignature Language="C#" Value="protected internal virtual void TrackViewState ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance void TrackViewState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Style.TrackViewState" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Sub TrackViewState ()" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual void TrackViewState();" />
<MemberSignature Language="F#" Value="abstract member TrackViewState : unit -&gt; unit&#xA;override this.TrackViewState : unit -&gt; unit" Usage="style.TrackViewState " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.TrackViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>A protected method. Marks the beginning for tracking state changes on the control. Any changes made after tracking has begun will be tracked and saved as part of the control view state.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ViewState">
<MemberSignature Language="C#" Value="protected internal System.Web.UI.StateBag ViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.StateBag ViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.ViewState" />
<MemberSignature Language="VB.NET" Value="Protected Friend ReadOnly Property ViewState As StateBag" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; property System::Web::UI::StateBag ^ ViewState { System::Web::UI::StateBag ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ViewState : System.Web.UI.StateBag" Usage="System.Web.UI.WebControls.Style.ViewState" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.StateBag</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the state bag that holds the style elements.</summary>
<value>A state bag that holds the style elements defined in it.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The private field name for the state bag is case sensitive.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Width">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.Unit Width { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.Unit Width" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Style.Width" />
<MemberSignature Language="VB.NET" Value="Public Property Width As Unit" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::Unit Width { System::Web::UI::WebControls::Unit get(); void set(System::Web::UI::WebControls::Unit value); };" />
<MemberSignature Language="F#" Value="member this.Width : System.Web.UI.WebControls.Unit with get, set" Usage="System.Web.UI.WebControls.Style.Width" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.NotifyParentProperty(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.Unit</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the width of the Web server control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.Unit" /> that represents the width of the Web server control. The default is <see cref="F:System.Web.UI.WebControls.Unit.Empty" />, which indicates that this property is not set.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Style.Width%2A> property to specify or determine the width of the Web server control. This property is set with a <xref:System.Web.UI.WebControls.Unit>.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <see cref="P:System.Web.UI.WebControls.Unit.Value" /> property of the <see cref="T:System.Web.UI.WebControls.Unit" /> is negative.</exception>
<altmember cref="T:System.Web.UI.WebControls.Unit" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.