WebPart.AllowMinimize Property

Gets or sets whether the Web Part can be minimized.

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

public override bool AllowMinimize { get; set; }

Property Value

Type: System.Boolean
true if the Web Part can be minimized; otherwise, false. The default value is true.

You can ensure that a Web Part is visible at all times by not allowing users to minimize the Web Part. For example, you may want a banner or a primary navigation Web Part to be visible at all times.

If this property is set to false, the Web Part Page displays the Web Part in expanded mode that cannot be changed by the user. If the property is set to true, the end user can minimize the Web Part.

To lock a Web Part in place, you set the AllowMinimize, AllowRemove, and AllowZoneChange properties to false. Setting all three properties to false prevents a user from minimizing, removing, or moving the Web Part.

This property cannot be personalized by individual users. The value of its WebPartStorageAttribute is Storage.Shared, which specifies that the property will be stored with the same value for all users. Only users with the Write web pages right can set this property. It can be set programmatically, or it can be set through the Web Part task pane in the shared view of the Web-based user interface, or by using a SharePoint Foundation-compatible HTML editor, such as SharePoint Designer.