Version

AutoSize Property

Determines whether the height of the control is automatically adjusted to the size of the font used for the text box.
Syntax
'Declaration
 
Public Overrides Property AutoSize As Boolean
public override bool AutoSize {get; set;}
Remarks

If this property is set to True, the height of the control automatically adjusts when the font is changed. When False, the control's height remains the same until explicitly changed. The default is True.

Example
Following code sets the height of the masked edit to a desired value in this case 100 by setting the AutoSize to false. Without AutoSize set to false, height can not be set since the masked edit resizes itself to the font's height.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinMaskedEdit

  Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
      ' When AutoSize is true (which it is by default), the the UltraMaskedEdit resizes its
      ' height to the font's height so the text fits properly vertically.. It also means that 
      ' it will not let you resize its height a desired value. To prevent the UltraMaskedEdit 
      ' from auto-resizing so that you can set its height to a desired value, set the AutoSize 
      ' to false. Below code sets the height of the masked edit to 100.

      Me.UltraMaskedEdit1.AutoSize = False

      ' Set the height to 100.
      Me.UltraMaskedEdit1.Height = 100
  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinMaskedEdit;
using System.Diagnostics;

private void button1_Click(object sender, System.EventArgs e)
{
	// When AutoSize is true (which it is by default), the the UltraMaskedEdit resizes its
	// height to the font's height so the text fits properly vertically.. It also means that 
	// it will not let you resize its height a desired value. To prevent the UltraMaskedEdit 
	// from auto-resizing so that you can set its height to a desired value, set the AutoSize 
	// to false. Below code sets the height of the masked edit to 100.

	this.ultraMaskedEdit1.AutoSize = false;

	// Set the height to 100.
	this.ultraMaskedEdit1.Height = 100;
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also