Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

230 lines
17 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Type Name="WebControlAdapter" FullName="System.Web.UI.WebControls.Adapters.WebControlAdapter">
<TypeSignature Language="C#" Value="public class WebControlAdapter : System.Web.UI.Adapters.ControlAdapter" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.Adapters.ControlAdapter</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Web.UI.WebControls.WebControl" /> class is the base class from which Web controls inherit. It defines many properties common to all Web controls. For more information, see <see cref="T:System.Web.UI.WebControls.WebControl" />.</para>
<para>A <see cref="T:System.Web.UI.WebControls.Adapters.WebControlAdapter" /> object is a component that substitutes certain <see cref="T:System.Web.UI.WebControls.WebControl" /> class or inherited methods and events in its execution life cycle to allow browser- or markup-specific handling. The .NET Framework maps a single control adapter to a derived <see cref="T:System.Web.UI.WebControls.WebControl" /> object for each client request. </para>
<para>An adapter modifies a control behavior for a specific browser or class of browsers or acts as an arbitrary filter on some capability. Much of the adaptability in rendering behavior can be encapsulated in the specialized classes that derive from the <see cref="T:System.Web.UI.HtmlTextWriter" /> class. Therefore, it is likely that a single adapter can be used for a number of browser class behaviors or that inclusion of the adaptability in the <see cref="T:System.Web.UI.HtmlTextWriter" /> classes might make the use of a control adapter unnecessary.</para>
<para>Controls themselves do not necessarily require an adapter. If controls are extended through composition, generally the adapters for the child controls are sufficient.</para>
<para>Each control has explicit mappings to adapters through the .browser definition files. Thus, any access to the <see cref="P:System.Web.UI.Control.Adapter" /> property of <see cref="T:System.Web.UI.WebControls.WebControl" /> uses the <see cref="T:System.Web.HttpBrowserCapabilities" /> object extracted from the .browser definition files to perform the lookup for the mapping of the adapter to control.</para>
<para>During processing, the .NET Framework intercepts calls to the overridable methods of a control that could be target-specific. If a control adapter is attached, the .NET Framework calls the associated adapter methods. For more information, see <see cref="T:System.Web.UI.Adapters.ControlAdapter" />.</para>
<para>The rendering for a <see cref="T:System.Web.UI.WebControls.WebControl" /> typically consists of a beginning and ending tag, and some inner markup between the beginning and ending tags. The tags are defined when the <see cref="T:System.Web.UI.WebControls.WebControl" /> is created. For more information, see <see cref="Overload:System.Web.UI.WebControls.WebControl.#ctor" />. </para>
<para>The tags are generated by the <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter)" /> and <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter)" /> methods, respectively. The inner markup is generated by the <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" /> method. </para>
<para>The <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.Render(System.Web.UI.HtmlTextWriter)" /> method generates all markup, by calling methods in the following order: </para>
<list type="ordered">
<item>
<para>
<see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter)" />.</para>
</item>
<item>
<para>
<see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" />.</para>
</item>
<item>
<para>
<see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter)" />.</para>
</item>
</list>
<para>The <see cref="P:System.Web.UI.WebControls.Adapters.WebControlAdapter.IsEnabled" /> property returns true only if the <see cref="T:System.Web.UI.WebControls.WebControl" /> and all its parent controls are enabled. The <see cref="P:System.Web.UI.WebControls.Adapters.WebControlAdapter.Control" /> property returns a strongly typed reference to the <see cref="T:System.Web.UI.WebControls.WebControl" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Customizes rendering for the Web control to which the control adapter is attached, to modify the default markup or behavior for specific browsers.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public WebControlAdapter ();" />
<MemberType>Constructor</MemberType>
<Parameters />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The .NET Framework internally constructs a new instance of the <see cref="T:System.Web.UI.WebControls.Adapters.WebControlAdapter" /> class when it creates the corresponding <see cref="T:System.Web.UI.WebControls.WebControl" /> object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.Adapters.WebControlAdapter" /> class.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Control">
<MemberSignature Language="C#" Value="protected System.Web.UI.WebControls.WebControl Control { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebControl</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When a <see cref="T:System.Web.UI.WebControls.Adapters.WebControlAdapter" /> object is attached to a <see cref="T:System.Web.UI.WebControls.WebControl" /> object, the .NET Framework calls on the adapter life-cycle methods instead of the control methods. For more information, see <see cref="T:System.Web.UI.Adapters.ControlAdapter" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a reference to the Web control to which this control adapter is attached.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="IsEnabled">
<MemberSignature Language="C#" Value="protected bool IsEnabled { 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>The <see cref="P:System.Web.UI.WebControls.Adapters.WebControlAdapter.IsEnabled" /> property provides access for the adapter and any of its derived classes to the <see cref="P:System.Web.UI.WebControls.WebControl.IsEnabled" /> property. <see cref="P:System.Web.UI.WebControls.WebControl.IsEnabled" /> scans the hierarchy of parent controls and returns true only if the Web control and all its parents are enabled.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value indicating whether the Web control and all its parent controls are enabled.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Render">
<MemberSignature Language="C#" Value="protected override void Render (System.Web.UI.HtmlTextWriter writer);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.Render(System.Web.UI.HtmlTextWriter)" /> method generates target-specific markup to send to the client browser. <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.Render(System.Web.UI.HtmlTextWriter)" /> is called in place of the <see cref="M:System.Web.UI.WebControls.WebControl.Render(System.Web.UI.HtmlTextWriter)" /> method if a <see cref="T:System.Web.UI.WebControls.Adapters.WebControlAdapter" /> object is attached to a <see cref="T:System.Web.UI.WebControls.WebControl" /> object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Generates the target-specific markup for the control to which the control adapter is attached.</para>
</summary>
<param name="writer">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to render the target-specific output. </param>
</Docs>
</Member>
<Member MemberName="RenderBeginTag">
<MemberSignature Language="C#" Value="protected virtual void RenderBeginTag (System.Web.UI.HtmlTextWriter writer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Override the <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter)" /> method to write additional markup tags or add attributes to the beginning tag for the <see cref="T:System.Web.UI.WebControls.WebControl" /> object. Use <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter)" /> in conjunction with the <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter)" /> method to assure beginning and ending tag consistency.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Creates the beginning tag for the Web control in the markup that is transmitted to the target browser.</para>
</summary>
<param name="writer">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to render the target-specific output. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="RenderContents">
<MemberSignature Language="C#" Value="protected virtual void RenderContents (System.Web.UI.HtmlTextWriter writer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" /> method generates the inner markup, between the beginning and ending tags for the control. Typically, markup is generated by <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.Render(System.Web.UI.HtmlTextWriter)" />, which calls methods in the following order:</para>
<list type="ordered">
<item>
<para>
<see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter)" />.</para>
</item>
<item>
<para>
<see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" />.</para>
</item>
<item>
<para>
<see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter)" />.</para>
</item>
</list>
<para> Override <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" /> to generate target-specific inner markup to send to the client browser. </para>
<para>The <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" /> base method calls <see cref="M:System.Web.UI.WebControls.WebControl.RenderContents(System.Web.UI.HtmlTextWriter)" />. The <see cref="M:System.Web.UI.WebControls.WebControl.RenderContents(System.Web.UI.HtmlTextWriter)" /> base method calls <see cref="M:System.Web.UI.Control.Render(System.Web.UI.HtmlTextWriter)" />, which in turn calls <see cref="M:System.Web.UI.Control.RenderChildren(System.Web.UI.HtmlTextWriter)" />. Thus, overrides of <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" /> should call the <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderContents(System.Web.UI.HtmlTextWriter)" /> base method only if its processing is in addition to, rather than instead of, <see cref="M:System.Web.UI.Control.Render(System.Web.UI.HtmlTextWriter)" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Generates the target-specific inner markup for the Web control to which the control adapter is attached.</para>
</summary>
<param name="writer">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to render the target-specific output. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="RenderEndTag">
<MemberSignature Language="C#" Value="protected virtual void RenderEndTag (System.Web.UI.HtmlTextWriter writer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Override the <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter)" /> method to write additional markup tags or add attributes to the ending tag for the <see cref="T:System.Web.UI.WebControls.WebControl" /> object. Use <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter)" /> in conjunction with the <see cref="M:System.Web.UI.WebControls.Adapters.WebControlAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter)" /> method to assure beginning and ending tag consistency.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Creates the ending tag for the Web control in the markup that is transmitted to the target browser.</para>
</summary>
<param name="writer">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Web.UI.HtmlTextWriter" /> containing methods to render the target-specific output. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>