Condividi tramite


WebPart.ContainerWidth Property

NOTE: This API is now obsolete.

Gets the value set by the page author as a hint to the Web Part of how wide to expect the containing Web Part zone to be.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Use WebPartZone.ContainerWidth instead.")> _
Protected ReadOnly Property ContainerWidth As String
    Get
'Usage
Dim value As String

value = Me.ContainerWidth
[ObsoleteAttribute("Use WebPartZone.ContainerWidth instead.")]
protected string ContainerWidth { get; }

Property Value

Type: System.String
A string that specifies a CSS width as a percentage (%) or pixels (PX).

Remarks

The value of the ContainerWidth property is available only at run time. The values of the EffectiveFrameType, ContainerWidth, and Permissions properties can change just before the Web Part is rendered. This is because the ZoneID property might have changed, which affects the values of these properties. These properties are guaranteed to have their final values, taking into account any needed zone changes, when the Web Part's RenderWebPart method is called.

See Also

Reference

WebPart Class

WebPart Members

Microsoft.SharePoint.WebPartPages Namespace