Intersoft.Client.UI.Aqua.UXInput Namespace : UXCurrencyEditor Class |
<TemplateVisualStateAttribute(Name="Positive", GroupName="CurrencyStates")> <TemplateVisualStateAttribute(GroupName="CurrencyStates", Name="Negative")> Public Class UXCurrencyEditor Inherits Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase(Of Nullable(Of Decimal)) Implements Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.Input.ICommandSource
Dim instance As UXCurrencyEditor
[TemplateVisualStateAttribute(Name="Positive", GroupName="CurrencyStates")] [TemplateVisualStateAttribute(GroupName="CurrencyStates", Name="Negative")] public class UXCurrencyEditor : Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase<Nullable<decimal>>, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.Input.ICommandSource
[TemplateVisualStateAttribute(Name="Positive", GroupName="CurrencyStates")] [TemplateVisualStateAttribute(GroupName="CurrencyStates", Name="Negative")] public ref class UXCurrencyEditor : public Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase<Nullable<decimal>>, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.Input.ICommandSource
UXCurrencyEditor has two numeric format that you can set from EditMask and DisplayMask property. The format specified in EditMask is used during editing mode and teh format specified in DisplayMask is used to display the numeric value.
If you want to use the EditMask as DisplayMask you can set the UseEditMaskAsDisplayMask to True. By enabling this property, UXCurrencyEditor will ignore the DisplayMask value if it is filled.
Edit mode is triggered if the UXCurrencyEditor has focus and is not readonly. By default the caret is positioned to the left of the decimal point. Numeric entry for the left side of the decimal point is right aligned, while the numeric entry for the right side of the decimal point is left aligned. Display mode is triggered if the UXCurrencyEditor does not has focus. |
The UXCurrencyEditor accept standard and custom .NET numeric format in the EditMask and DisplayMask. Some of the format is not parsed in EditMask because it is only used as a display format.
Valid EditMask | Format Specifier | Description |
---|---|---|
V | C, c | Currency A currency value. |
V | D, d | Decimal Integer digits with optional negative sign. |
X | E, e | Exponential (scientific) Exponential notation. |
V | F, f | Fixed-point Integral and decimal digits with optional negative sign. |
X | G, g | General The most compact of either fixed-point or scientific notation. |
V | N, n | Number Integral and decimal digits, group separators, and a decimal separator with optional negative sign. |
V | P, p | Percent Number multiplied by 100 and displayed with a percent symbol. |
X | R, r | Round-trip A string that can round-trip to an identical number. |
X | X, x | Hexadecimal A hexadecimal string. |
Currently UXCurrencyEditor standard format will not accept custom group sizes. The group sizes will always be 3. |
Valid EditMask | Format Specifier | Description |
---|---|---|
V | 0 | Zero placeholder Replaces the zero with the corresponding digit if one is present; otherwise, zero appears in the result string. |
V | # | Digit placeholder Replaces the pound sign with the corresponding digit if one is present; otherwise, no digit appears in the result string. |
V | . | Decimal point Determines the location of the decimal separator in the result string. |
V | , | Group separator and number scaling Replaces the pound sign with the corresponding digit if one is present; otherwise, no digit appears in the result string. |
V | % | Percentage placeholder Multiplies a number by 100 and inserts a localized percentage symbol in the result string. |
X | E0, E+0, E-0, e0, e+0, e-0 | Exponential notation If followed by at least one 0 (zero), formats the result using exponential notation. The case of "E" or "e" indicates the case of the exponent symbol in the result string. The number of zeros following the "E" or "e" character determines the minimum number of digits in the exponent. A plus sign (+) indicates that a sign character always precedes the exponent. A minus sign (-) indicates that a sign character precedes only negative exponents. |
V | \ | Escape character Causes the next character to be interpreted as a literal rather than as a custom format specifier. |
V | 'string', "string" | Literal string delimiter Indicates that the enclosed characters should be copied to the result string unchanged. |
V | ; | Section separator Defines sections with separate format strings for positive, negative, and zero numbers. |
By default, if UXCurrencyEditor have a negative value, the visual state is changed and modify the Foreground property UXCurrencyEditor to Red.
You could also customize the negative value pattern by using Section separator, the EditMask only accept positive and negative format. By default if negative pattern is not assigned the pattern is -[EditMask].
For example a value of -10000
XAML |
Copy Code
|
---|---|
<Intersoft:UXCurrencyEditor Width="200" Height="24" EditMask="0.00" DisplayMask="#,##0.00"/> |
System.Object
System.Windows.DependencyObject
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.TextBox
Intersoft.Client.Framework.ISTextBox
Intersoft.Client.UI.Controls.UXTextBox
Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputBase
Intersoft.Client.UI.Aqua.UXInput.UXMaskedInputGenericBase<T>
Intersoft.Client.UI.Aqua.UXInput.UXCurrencyEditor
Target Platforms: 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