Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
718 lines (626 sloc) 49.8 KB
<Type Name="Panel" FullName="System.Web.UI.WebControls.Panel">
<TypeSignature Language="C#" Value="public class Panel : System.Web.UI.WebControls.WebControl" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Panel extends System.Web.UI.WebControls.WebControl" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.Panel" />
<TypeSignature Language="VB.NET" Value="Public Class Panel&#xA;Inherits WebControl" />
<TypeSignature Language="C++ CLI" Value="public ref class Panel : System::Web::UI::WebControls::WebControl" />
<TypeSignature Language="F#" Value="type Panel = class&#xA; inherit WebControl" />
<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.Web.UI.WebControls.WebControl</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="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.Designer("System.Web.UI.Design.WebControls.PanelContainerDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.ParseChildren(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistChildren(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.WebControls.PanelDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.Web.UI.ToolboxData("&lt;{0}:Panel runat=server&gt;Panel&lt;/{0}:Panel&gt;")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.WebControls.PanelContainerDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a control that acts as a container for other controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In this topic:
- [Introduction](#introduction)
- [Declarative Syntax](#declarative_syntax)
<a name="introduction"></a>
## Introduction
The <xref:System.Web.UI.WebControls.Panel> control is a container for other controls. It is especially useful when you want to generate controls programmatically, hide/show a group of controls, or localize a group of controls.
The <xref:System.Web.UI.WebControls.Panel.Direction%2A> property is useful for localizing a <xref:System.Web.UI.WebControls.Panel> control's content to display text for languages that are written from right to left, such as Arabic or Hebrew.
The <xref:System.Web.UI.WebControls.Panel> control provides several properties that allow you to customize the behavior and display of its contents. Use the <xref:System.Web.UI.WebControls.Panel.BackImageUrl%2A> property to display a custom image for the <xref:System.Web.UI.WebControls.Panel> control. Use the <xref:System.Web.UI.WebControls.Panel.ScrollBars%2A> property to specify scroll bars for the control.
<a name="declarative_syntax"></a>
## Declarative Syntax
```
<asp:Panel
    AccessKey="string"
    BackColor="color name|#dddddd"
    BackImageUrl="uri"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
Inset|Outset"
    BorderWidth="size"
    CssClass="string"
    DefaultButton="string"
    Direction="NotSet|LeftToRight|RightToLeft"
    Enabled="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    GroupingText="string"
    Height="size"
    HorizontalAlign="NotSet|Left|Center|Right|Justify"
    ID="string"
    OnDataBinding="DataBinding event handler"
    OnDisposed="Disposed event handler"
    OnInit="Init event handler"
    OnLoad="Load event handler"
    OnPreRender="PreRender event handler"
    OnUnload="Unload event handler"
    runat="server"
    ScrollBars="None|Horizontal|Vertical|Both|Auto"
    SkinID="string"
    Style="string"
    TabIndex="integer"
    ToolTip="string"
    Visible="True|False"
    Width="size"
    Wrap="True|False"
/>
```
## Examples
The following example illustrates the use of a <xref:System.Web.UI.WebControls.Panel> control to generate controls programmatically and to hide/show a group of controls.
> [!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[Classic Panel Example 2#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Panel Example 2/CS/sourcecs.aspx#1)]
[!code-aspx-vb[Classic Panel Example 2#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Panel Example 2/VB/sourcevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebControl" />
<altmember cref="P:System.Web.UI.WebControls.Panel.Direction" />
<altmember cref="P:System.Web.UI.WebControls.Panel.BackImageUrl" />
<altmember cref="P:System.Web.UI.WebControls.Panel.ScrollBars" />
<related type="Article" href="https://msdn.microsoft.com/library/127b61ed-87f2-46f4-92a3-785166e7245b">Panel Web Server Control Overview</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Panel ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Panel.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Panel();" />
<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.Panel" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example illustrates how to create a new instance of the <xref:System.Web.UI.WebControls.Panel> control containing a <xref:System.Web.UI.WebControls.Label> control that is aligned to the right.
> [!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[Classic Panel.Panel Example#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Panel.Panel Example/CS/sourcecs.aspx#1)]
[!code-aspx-vb[Classic Panel.Panel Example#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Panel.Panel Example/VB/sourcevb.aspx#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AddAttributesToRender">
<MemberSignature Language="C#" Value="protected override void AddAttributesToRender (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void AddAttributesToRender(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Panel.AddAttributesToRender(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub AddAttributesToRender (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void AddAttributesToRender(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.AddAttributesToRender : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="panel.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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</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>
<summary>Adds information about the background image, alignment, wrap, and direction to the list of attributes to render.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Panel.AddAttributesToRender%2A> method is used primarily by control developers.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.Panel.AddAttributesToRender%2A> method in a custom server control so that the <xref:System.Web.UI.WebControls.Panel> text always displays as bold.
[!code-aspx-csharp[CustomPanelAddAttributesToRender#1](~/samples/snippets/csharp/VS_Snippets_WebNet/CustomPanelAddAttributesToRender/CS/custom_panel_addattributestorendercs.aspx#1)]
[!code-aspx-vb[CustomPanelAddAttributesToRender#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/CustomPanelAddAttributesToRender/VB/custom_panel_addattributestorendervb.aspx#1)]
[!code-csharp[CustomPanelAddAttributesToRender#2](~/samples/snippets/csharp/VS_Snippets_WebNet/CustomPanelAddAttributesToRender/CS/custom_panel_addattributestorender.cs#2)]
[!code-vb[CustomPanelAddAttributesToRender#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/CustomPanelAddAttributesToRender/VB/custom_panel_addattributestorender.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="P:System.Web.UI.WebControls.Panel.DefaultButton" /> property of the <see cref="T:System.Web.UI.WebControls.Panel" /> control must be the ID of a control of type <see cref="T:System.Web.UI.WebControls.IButtonControl" />.</exception>
</Docs>
</Member>
<Member MemberName="BackImageUrl">
<MemberSignature Language="C#" Value="public virtual string BackImageUrl { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string BackImageUrl" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.BackImageUrl" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property BackImageUrl As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ BackImageUrl { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.BackImageUrl : string with get, set" Usage="System.Web.UI.WebControls.Panel.BackImageUrl" />
<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 FrameworkAlternate="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.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</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.UrlProperty</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the URL of the background image for the panel control.</summary>
<value>The URL of the background image for the panel control. The default is <see cref="F:System.String.Empty" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to display a custom image for the <xref:System.Web.UI.WebControls.Panel> control.
If the image is smaller than the <xref:System.Web.UI.WebControls.Panel>, it will be tiled to fill in the <xref:System.Web.UI.WebControls.Panel>.
> [!NOTE]
> This property is supported only on browsers that support HTML 4.0 or later.
## Examples
The following example illustrates how to programmatically set the <xref:System.Web.UI.WebControls.Panel.BackImageUrl%2A> property of the <xref:System.Web.UI.WebControls.Panel>.
> [!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[Classic Panel.BackImageUrl Example#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Panel.BackImageUrl Example/CS/sourcecs.aspx#1)]
[!code-aspx-vb[Classic Panel.BackImageUrl Example#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Panel.BackImageUrl Example/VB/sourcevb.aspx#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CreateControlStyle">
<MemberSignature Language="C#" Value="protected override System.Web.UI.WebControls.Style CreateControlStyle ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Web.UI.WebControls.Style CreateControlStyle() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Panel.CreateControlStyle" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function CreateControlStyle () As Style" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Web::UI::WebControls::Style ^ CreateControlStyle();" />
<MemberSignature Language="F#" Value="override this.CreateControlStyle : unit -&gt; System.Web.UI.WebControls.Style" Usage="panel.CreateControlStyle " />
<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.WebControls.Style</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a style object that is used internally by the <see cref="T:System.Web.UI.WebControls.Panel" /> control to implement all style related properties.</summary>
<returns>A <see cref="T:System.Web.UI.WebControls.PanelStyle" /> that contains the style properties of the control.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Panel.CreateControlStyle%2A> method is used primarily by control developers.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DefaultButton">
<MemberSignature Language="C#" Value="public virtual string DefaultButton { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DefaultButton" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.DefaultButton" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property DefaultButton As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ DefaultButton { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DefaultButton : string with get, set" Usage="System.Web.UI.WebControls.Panel.DefaultButton" />
<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.DefaultValue("")</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.Themeable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the identifier for the default button that is contained in the <see cref="T:System.Web.UI.WebControls.Panel" /> control.</summary>
<value>A string value corresponding to the <see cref="P:System.Web.UI.Control.ID" /> for a button control contained in the <see cref="T:System.Web.UI.WebControls.Panel" />. The default is an empty string, indicating that the <see cref="T:System.Web.UI.WebControls.Panel" /> does not have a default button.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Panel.DefaultButton%2A> property to indicate which button gets clicked when the <xref:System.Web.UI.WebControls.Panel> control has focus and the user presses the ENTER key. The <xref:System.Web.UI.WebControls.Panel.DefaultButton%2A> can be set to the identifier for a <xref:System.Web.UI.WebControls.Button> control or any control that implements the <xref:System.Web.UI.WebControls.IButtonControl> interface except a <xref:System.Web.UI.WebControls.LinkButton> control.
If the <xref:System.Web.UI.WebControls.Panel.DefaultButton%2A> is set to a control that does not implement the <xref:System.Web.UI.WebControls.IButtonControl> interface, or to a control that is not contained in the <xref:System.Web.UI.WebControls.Panel> control, the <xref:System.Web.UI.WebControls.Panel> control throws an exception while rendering.
Setting the <xref:System.Web.UI.WebControls.Panel.DefaultButton%2A> property is not supported for the following scenarios:
- Setting focus outside of the input controls in the panel and then pressing the ENTER key. The default post back action is not guaranteed to trigger.
- Pressing the ENTER key with focus inside a multi-line textbox. In a multi-line textbox, pressing the ENTER key should create a new line in the textbox which is the expected behavior. In browsers where the pressing the ENTER key inside a multi-line textbox triggers a post back but you want the ENTER key to create a new line instead you can attach a JavaScript function to the input control. The script should capture the ENTER key and stop the post back. For example, you can use the <xref:System.Web.UI.WebControls.WebControl.Attributes%2A> property collection to add client script for the `onKeyPress` event.
- Referencing a default button that is a <xref:System.Web.UI.WebControls.LinkButton> control. Only <xref:System.Web.UI.WebControls.Button> and <xref:System.Web.UI.WebControls.ImageButton> controls are supported.
- Changing the <xref:System.Web.UI.WebControls.Panel.DefaultButton%2A> programmatically during an asynchronous post back when the <xref:System.Web.UI.WebControls.Panel> control is not inside of an <xref:System.Web.UI.UpdatePanel> control. Asynchronous post backs can be enabled on a page by adding one or more <xref:System.Web.UI.UpdatePanel> controls to the page. <xref:System.Web.UI.UpdatePanel> controls can be used to update selected regions of a page instead of updating the whole page with a postback. For more information, see [UpdatePanel Control Overview](https://msdn.microsoft.com/library/29a2265d-9674-4c19-b70e-e5560ee9689a) and [Partial-Page Rendering Overview](https://msdn.microsoft.com/library/5c12736d-d9e9-464a-9388-3fe0f9f49e49).
- Setting this property by themes or style sheet themes. For more information, see <xref:System.Web.UI.ThemeableAttribute> and [ASP.NET Themes and Skins](https://msdn.microsoft.com/library/5df3ebbd-d46c-4502-9406-02f9df4ef2c3).
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.Button.OnClick(System.EventArgs)" />
<altmember cref="E:System.Web.UI.WebControls.IButtonControl.Click" />
</Docs>
</Member>
<Member MemberName="Direction">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.ContentDirection Direction { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.ContentDirection Direction" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.Direction" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Direction As ContentDirection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Web::UI::WebControls::ContentDirection Direction { System::Web::UI::WebControls::ContentDirection get(); void set(System::Web::UI::WebControls::ContentDirection value); };" />
<MemberSignature Language="F#" Value="member this.Direction : System.Web.UI.WebControls.ContentDirection with get, set" Usage="System.Web.UI.WebControls.Panel.Direction" />
<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.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ContentDirection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the direction in which to display controls that include text in a <see cref="T:System.Web.UI.WebControls.Panel" /> control.</summary>
<value>One of the <see cref="T:System.Web.UI.WebControls.ContentDirection" /> enumeration values. The default is <see langword="NotSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Panel.Direction%2A> property to specify the display direction for controls that include text in a <xref:System.Web.UI.WebControls.Panel> control. This property is set using one of the <xref:System.Web.UI.WebControls.ContentDirection> enumeration values. The following table lists the possible values.
|Value|Description|
|-----------|-----------------|
|`NotSet`|The content direction is not set.|
|`LeftToRight`|The content direction is left to right.|
|`RightToLeft`|The content direction is right to left.|
If you specify `LeftToRight`, child controls that include text display from left to right. If you specify `RightToLeft`, child controls that include text display right to left. Use `RightToLeft` to display text for languages that are written from right to left, such as Arabic or Hebrew.
> [!NOTE]
> This property is supported only on browsers that support HTML 4.0 or later.
## Examples
The following code example demonstrates how to programmatically set the <xref:System.Web.UI.WebControls.Panel.Direction%2A> property. A <xref:System.Web.UI.WebControls.ListBox> control is populated with the <xref:System.Web.UI.WebControls.ContentDirection> enumeration values. The display direction of the label and radio buttons in the panel change, based on the value the user selects from the list box. Note that this example uses English text. Therefore, when the `RightToLeft` value is selected, the text is justified on the right side of the <xref:System.Web.UI.WebControls.Panel> control, but the left-to-right order of the English text is maintained. In a real-world application you would not set the <xref:System.Web.UI.WebControls.Panel.Direction%2A> property to `RightToLeft` if you were displaying text for a left-to-right language.
> [!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-vb[Panel.Direction#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Panel.Direction/VB/panel.directionvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.ContentDirection" />
</Docs>
</Member>
<Member MemberName="GroupingText">
<MemberSignature Language="C#" Value="public virtual string GroupingText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string GroupingText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.GroupingText" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property GroupingText As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ GroupingText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.GroupingText : string with get, set" Usage="System.Web.UI.WebControls.Panel.GroupingText" />
<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.DefaultValue("")</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.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the caption for the group of controls that is contained in the panel control.</summary>
<value>The caption text for the child controls contained in the panel control. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Panel.GroupingText%2A> property to display a frame and caption for the group of controls that is contained in the <xref:System.Web.UI.WebControls.Panel> control.
The <xref:System.Web.UI.WebControls.Panel.GroupingText%2A> value of a <xref:System.Web.UI.WebControls.Panel> control is rendered using the FIELDSET and LEGEND elements, which were introduced in the HTML 4.0 specification. If the client browser uses HTML 3.2, the <xref:System.Web.UI.WebControls.Panel.GroupingText%2A> value is not rendered. Refer to your client browser documentation for details on how the FIELDSET and LEGEND elements are displayed.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <xref:System.ComponentModel.LocalizableAttribute> and [ASP.NET Globalization and Localization](https://msdn.microsoft.com/library/8ef3838e-9d05-4236-9dd0-ceecff9df80d).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HorizontalAlign">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.HorizontalAlign HorizontalAlign" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.HorizontalAlign" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property HorizontalAlign As HorizontalAlign" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Web::UI::WebControls::HorizontalAlign HorizontalAlign { System::Web::UI::WebControls::HorizontalAlign get(); void set(System::Web::UI::WebControls::HorizontalAlign value); };" />
<MemberSignature Language="F#" Value="member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set" Usage="System.Web.UI.WebControls.Panel.HorizontalAlign" />
<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 FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.HorizontalAlign</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the horizontal alignment of the contents within the panel.</summary>
<value>One of the <see cref="T:System.Web.UI.WebControls.HorizontalAlign" /> values. The default is <see langword="NotSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to specify the alignment of the elements in the <xref:System.Web.UI.WebControls.Panel>.
## Examples
The following example illustrates how to right-align or left-align the controls within the <xref:System.Web.UI.WebControls.Panel>.
> [!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[Classic Panel.HorizontalAlign Example#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Panel.HorizontalAlign Example/CS/sourcecs.aspx#1)]
[!code-aspx-vb[Classic Panel.HorizontalAlign Example#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Panel.HorizontalAlign Example/VB/sourcevb.aspx#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The horizontal alignment is not one of the <see cref="T:System.Web.UI.WebControls.HorizontalAlign" /> values.</exception>
<altmember cref="T:System.Web.UI.WebControls.HorizontalAlign" />
</Docs>
</Member>
<Member MemberName="RenderBeginTag">
<MemberSignature Language="C#" Value="public override void RenderBeginTag (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void RenderBeginTag(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Panel.RenderBeginTag(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub RenderBeginTag (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void RenderBeginTag(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.RenderBeginTag : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="panel.RenderBeginTag writer" />
<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="writer" Type="System.Web.UI.HtmlTextWriter" 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="writer">An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param>
<summary>Renders the HTML opening tag of the <see cref="T:System.Web.UI.WebControls.Panel" /> control to the specified writer.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Panel.RenderBeginTag%2A> method is used primarily by control developers.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RenderEndTag">
<MemberSignature Language="C#" Value="public override void RenderEndTag (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void RenderEndTag(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.Panel.RenderEndTag(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub RenderEndTag (writer As HtmlTextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void RenderEndTag(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberSignature Language="F#" Value="override this.RenderEndTag : System.Web.UI.HtmlTextWriter -&gt; unit" Usage="panel.RenderEndTag writer" />
<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="writer" Type="System.Web.UI.HtmlTextWriter" 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="writer">An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param>
<summary>Renders the HTML closing tag of the <see cref="T:System.Web.UI.WebControls.Panel" /> control into the specified writer.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.Panel.RenderEndTag%2A> method is used primarily by control developers.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ScrollBars">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.ScrollBars ScrollBars { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.ScrollBars ScrollBars" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.ScrollBars" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ScrollBars As ScrollBars" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Web::UI::WebControls::ScrollBars ScrollBars { System::Web::UI::WebControls::ScrollBars get(); void set(System::Web::UI::WebControls::ScrollBars value); };" />
<MemberSignature Language="F#" Value="member this.ScrollBars : System.Web.UI.WebControls.ScrollBars with get, set" Usage="System.Web.UI.WebControls.Panel.ScrollBars" />
<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.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ScrollBars</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the visibility and position of scroll bars in a <see cref="T:System.Web.UI.WebControls.Panel" /> control.</summary>
<value>One of the <see cref="T:System.Web.UI.WebControls.ScrollBars" /> enumeration values. The default is <see langword="None" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.Panel.ScrollBars%2A> property to specify the visibility and position of scroll bars in a <xref:System.Web.UI.WebControls.Panel> control. This property is set using one of the <xref:System.Web.UI.WebControls.ScrollBars> enumeration values. The following table lists the possible values.
|Value|Description|
|-----------|-----------------|
|`None`|No scroll bars are shown.|
|`Horizontal`|Only a horizontal scroll bar is shown.|
|`Vertical`|Only a vertical scroll bar is shown.|
|`Both`|Both horizontal and vertical scroll bars are shown.|
|`Auto`|If necessary, horizontal, vertical, or both scroll bars are shown. Otherwise, no scroll bars are shown.|
If you specify `Auto` for the <xref:System.Web.UI.WebControls.Panel.ScrollBars%2A> property, scroll bars are automatically shown when the size of the content in a <xref:System.Web.UI.WebControls.Panel> control exceeds the size of the <xref:System.Web.UI.WebControls.Panel> control itself. For example, if a <xref:System.Web.UI.WebControls.Panel> control contains a table, and the panel is not wide enough to display all the rows in the table, a vertical scroll bar is shown. If the size of the table exceeds the height and width of the panel, both vertical and horizontal scroll bars are shown.
> [!NOTE]
> This property is supported only on browsers that support HTML 4.0 or later.
## Examples
The following code example demonstrates how to declaratively set the <xref:System.Web.UI.WebControls.Panel.ScrollBars%2A> property to `Auto`. The panel contains a table, the entire contents of which exceed the size of the panel. This causes both vertical and horizontal scroll bars to be automatically displayed when the panel is rendered. The user can then scroll to view all the data in the table.
> [!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[Panel.Scrollbars#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Panel.Scrollbars/CS/panel.scrollbarscs.aspx#1)]
[!code-aspx-vb[Panel.Scrollbars#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Panel.Scrollbars/VB/panel.scrollbarsvb.aspx#1)]
The following code example demonstrates how to programmatically set the <xref:System.Web.UI.WebControls.Panel.ScrollBars%2A> property. A <xref:System.Web.UI.WebControls.ListBox> control is populated with the <xref:System.Web.UI.WebControls.ScrollBars> enumeration values. The scroll bars displayed in the panel change, based on the value the user selects from the list box.
> [!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[Panel.Scrollbars2#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Panel.Scrollbars2/CS/panel.scrollbars2cs.aspx#1)]
[!code-aspx-vb[Panel.Scrollbars2#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Panel.Scrollbars2/VB/panel.scrollbars2vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.ScrollBars" />
</Docs>
</Member>
<Member MemberName="SupportsDisabledAttribute">
<MemberSignature Language="C#" Value="public override bool SupportsDisabledAttribute { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool SupportsDisabledAttribute" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.SupportsDisabledAttribute" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property SupportsDisabledAttribute As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool SupportsDisabledAttribute { bool get(); };" />
<MemberSignature Language="F#" Value="member this.SupportsDisabledAttribute : bool" Usage="System.Web.UI.WebControls.Panel.SupportsDisabledAttribute" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the control should set the <see langword="disabled" /> attribute of the rendered HTML element to "disabled" when the control's <see cref="P:System.Web.UI.WebControls.WebControl.IsEnabled" /> property is <see langword="false" />.</summary>
<value>
<see langword="true" /> if the <see cref="P:System.Web.UI.Control.RenderingCompatibility" /> property indicates an ASP.NET version lower than <c>4.0</c>; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property indicates how ASP.NET should render HTML for a control when the control is disabled. If this property is `true`, ASP.NET renders a `disabled` attribute when a control is disabled. If this property is `false`, ASP.NET renders a `class` attribute when a control is disabled. For more information, see <xref:System.Web.UI.WebControls.WebControl.SupportsDisabledAttribute%2A?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.RenderingCompatibility" />
<altmember cref="P:System.Web.UI.WebControls.WebControl.DisabledCssClass" />
<altmember cref="P:System.Web.UI.WebControls.WebControl.SupportsDisabledAttribute" />
</Docs>
</Member>
<Member MemberName="Wrap">
<MemberSignature Language="C#" Value="public virtual bool Wrap { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Wrap" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.Panel.Wrap" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Wrap As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool Wrap { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Wrap : bool with get, set" Usage="System.Web.UI.WebControls.Panel.Wrap" />
<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(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the content wraps within the panel.</summary>
<value>
<see langword="true" /> if the content wraps within the panel; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to wrap the contents of the <xref:System.Web.UI.WebControls.Panel>.
## Examples
The following example illustrates how to programmatically set the <xref:System.Web.UI.WebControls.Panel.Wrap%2A> property of the <xref:System.Web.UI.WebControls.Panel> control.
> [!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[Classic Panel.Wrap Example#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Panel.Wrap Example/CS/sourcecs.aspx#1)]
[!code-aspx-vb[Classic Panel.Wrap Example#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Panel.Wrap Example/VB/sourcevb.aspx#1)]
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.