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
public virtual bool AllowResize {get;}
public: __property virtual bool get_AllowResize();
public function get AllowResize() : Boolean;

Property Value

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


[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
      ' 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.


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

.NET Framework Security: 

See Also

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

© 2014 Microsoft