Export (0) Print
Expand All

ControlDesigner.AllowResize Property

Gets a value indicating whether the control can be resized.

[Visual Basic]
Public Overridable ReadOnly Property AllowResize As Boolean
[C#]
public virtual bool AllowResize {get;}
[C++]
public: __property virtual bool get_AllowResize();
[JScript]
public function get AllowResize() : Boolean;

Property Value

true if the control can be resized; otherwise, false.

Example

[Visual Basic] The following code example overrides the AllowResize property in a templated control designer. The code checks whether the values of the TemplateExists and InTemplateMode properties are true. AllowResize returns false only if both of these property values are false.

[Visual Basic] 
Public Overrides ReadOnly Property AllowResize() As Boolean
   Get
      ' When templates are not defined, render a read-only,
      ' fixed-size block. Once templates are defined or
      ' are being edited, the control allows resizing.
      Return TemplatesExist Or InTemplateMode
   End Get
End Property

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ControlDesigner Class | ControlDesigner Members | System.Web.UI.Design Namespace

Show:
© 2014 Microsoft