'Declaration Public Enum EditAsType Inherits System.Enum
public enum EditAsType : System.Enum
Member | Description |
---|---|
AutoSense | If the EditAs is set to AutoSense, then the masked edit will try to autosense the mask from the type of data set on the Value property. |
Currency | currency type |
Date | date type (month, day, and year) |
DateTime | data and time |
Double | double type |
Integer | integer type |
Long | Long |
String | string type |
Time | time ( hour, minute, second ) |
UseSpecifiedMask | Indicates that use the mask specified using InputMask property. If InputMask property is set to null or empty string, this acts just like AutoSense |
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinMaskedEdit Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Set the InputMask to the desired mask. Me.UltraMaskedEdit1.EditAs = EditAsType.Currency ' Optionally assign a culture to CultureInfo property. Me.UltraMaskedEdit1.CultureInfo = System.Globalization.CultureInfo.CreateSpecificCulture("en-GB") ' Optinally assign a DisplayStyle to desired display style. Me.UltraMaskedEdit1.DisplayStyle = EmbeddableElementDisplayStyle.OfficeXP ' Set the main appearance by using Appearance property. Me.UltraMaskedEdit1.Appearance.TextHAlign = HAlign.Right Me.UltraMaskedEdit1.Appearance.FontData.Bold = DefaultableBoolean.True Me.UltraMaskedEdit1.Appearance.ForeColor = Color.DarkBlue ' Set the highlight colors. These colors get applied to the selected text ' in the masked edit. Me.UltraMaskedEdit1.SelectedTextBackColor = Color.LightBlue Me.UltraMaskedEdit1.SelectedTextForeColor = Color.Yellow ' Set the colors of the prompt and literal characters. Me.UltraMaskedEdit1.PromptCharacterAppearance.ForeColor = Color.Red Me.UltraMaskedEdit1.MaskLiteralsAppearance.ForeColor = Color.Green ' Set the Nullable to false and NullText to an appropriate string. Me.UltraMaskedEdit1.Nullable = False End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinMaskedEdit; using System.Diagnostics; private void Form1_Load(object sender, System.EventArgs e) { // Set the InputMask to the desired mask. this.ultraMaskedEdit1.EditAs = EditAsType.Currency; // Optionally assign a culture to CultureInfo property. this.ultraMaskedEdit1.CultureInfo = System.Globalization.CultureInfo.CreateSpecificCulture( "en-GB" ); // Optinally assign a DisplayStyle to desired display style. this.ultraMaskedEdit1.DisplayStyle = EmbeddableElementDisplayStyle.OfficeXP; // Set the main appearance by using Appearance property. this.ultraMaskedEdit1.Appearance.TextHAlign = HAlign.Right; this.ultraMaskedEdit1.Appearance.FontData.Bold = DefaultableBoolean.True; this.ultraMaskedEdit1.Appearance.ForeColor = Color.DarkBlue; // Set the highlight colors. These colors get applied to the selected text // in the masked edit. this.ultraMaskedEdit1.SelectedTextBackColor = Color.LightBlue; this.ultraMaskedEdit1.SelectedTextForeColor = Color.Yellow; // Set the colors of the prompt and literal characters. this.ultraMaskedEdit1.PromptCharacterAppearance.ForeColor = Color.Red; this.ultraMaskedEdit1.MaskLiteralsAppearance.ForeColor = Color.Green; // Set the Nullable to false and NullText to an appropriate string. this.ultraMaskedEdit1.Nullable = false; }
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