Class SfNumericTextBox
Represents a Syncfusion.UI.Xaml.Controls.Input.TextBoxExt control. Represents a control that allows the user to enter only numeric values.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Controls.Input
Assembly: Syncfusion.SfInput.UWP.dll
Syntax
[ClassReference(IsReviewed = false)]
public class SfNumericTextBox : SfTextBoxExt, IDataValidator, IDisposable
Remarks
The NumericTextBox is inherited from Syncfusion.UI.Xaml.Controls.Input.TextBoxExt control.
Constructors
SfNumericTextBox()
Initializes a new instance of the SfNumericTextBox class.
Declaration
[ClassReference(IsReviewed = false)]
public SfNumericTextBox()
Fields
AllowDefaultDecimalDigitsProperty
Using a DependencyProperty as the backing store for AllowDefaultDecimalDigitsProperty. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty AllowDefaultDecimalDigitsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
AllowNullProperty
Using a DependencyProperty as the backing store for AllowNull. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty AllowNullProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
BlockCharactersOnTextInputProperty
Using a DependencyProperty as the backing store for BlockCharactersOnTextInput. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty BlockCharactersOnTextInputProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
CultureProperty
Using a DependencyProperty as the backing store for Culture. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty CultureProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
EnableGroupSeparatorProperty
Using a DependencyProperty as the backing store for EnableGroupSeparator. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty EnableGroupSeparatorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
FormatStringProperty
Using a DependencyProperty as the backing store for FormatString. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty FormatStringProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
GroupSeparatorModeProperty
Identifies the GroupSeparatorMode property. It is used to change the group separator active mode.
Declaration
public static readonly DependencyProperty GroupSeparatorModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
IntermediateValueProperty
Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty IntermediateValueProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MaximumNumberDecimalDigitsProperty
Using a DependencyProperty as the backing store for MaximumNumberDecimalDigits. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MaximumNumberDecimalDigitsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MaximumProperty
Using a DependencyProperty as the backing store for Maximum.
Declaration
public static readonly DependencyProperty MaximumProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MinimumProperty
Using a DependencyProperty as the backing store for Minimum.
Declaration
public static readonly DependencyProperty MinimumProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ParsingModeProperty
Using a DependencyProperty as the backing store for BlockCharactersOnTextInput. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ParsingModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
PercentDisplayModeProperty
Using a DependencyProperty as the backing store for PercentDisplayMode. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty PercentDisplayModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectAllOnFocusProperty
Using a DependencyProperty as the backing store for SelectAllOnFocus. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectAllOnFocusProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ValueChangedModeProperty
Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ValueChangedModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ValueProperty
Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
AllowDefaultDecimalDigits
Gets or sets a value indicating whether to allow the default decimal digits while the control is unfocused.
Declaration
public bool AllowDefaultDecimalDigits { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowNull
Gets or sets a value indicating whether null value can be set or not in input field.
Declaration
[ClassReference(IsReviewed = false)]
public bool AllowNull { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if allow null value; otherwise, false. |
BlockCharactersOnTextInput
Gets or sets a value indicating whether block character is present or not.
Declaration
public bool BlockCharactersOnTextInput { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Culture
Gets or sets the value for a culture to display the value based on it.
Declaration
[ClassReference(IsReviewed = false)]
public CultureInfo Culture { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo | The Default value is System.Globalization.CultureInfo. |
EnableGroupSeparator
Gets or sets a value indicating whether group separator field is enable or not.
Declaration
public bool EnableGroupSeparator { get; set; }
Property Value
Type |
---|
System.Boolean |
FormatString
Gets or sets the value that determines the display format of the text when the control is unfocused.
Declaration
[ClassReference(IsReviewed = false)]
public string FormatString { get; set; }
Property Value
Type | Description |
---|---|
System.String | The format string. |
See Also
GroupSeparatorMode
Gets or sets the value of GroupSeparatorMode. It is used to change the group separator active mode.
Declaration
public GroupSeparatorMode GroupSeparatorMode { get; set; }
Property Value
Type | Description |
---|---|
GroupSeparatorMode | The default value is Always |
Maximum
Gets or sets the maximum range of the numeric text box.
Declaration
[ClassReference(IsReviewed = false)]
public object Maximum { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The Default value is null. |
MaximumNumberDecimalDigits
Gets or sets a value that determines the maximum number of decimal digits to be allowed.
Declaration
[ClassReference(IsReviewed = false)]
public int MaximumNumberDecimalDigits { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The Default value is System.Int32.MaxValue. |
Minimum
Gets or sets the minimum range of the numeric text box.
Declaration
[ClassReference(IsReviewed = false)]
public object Minimum { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The Default value is null. |
ParsingMode
Gets or sets the Parsing mode Parsers
Declaration
public Parsers ParsingMode { get; set; }
Property Value
Type | Description |
---|---|
Parsers | The default value is Double |
PercentDisplayMode
Gets or sets a Percent DisplayMode associated with Syncfusion.UI.Xaml.Controls.Input.NumericTextBox
Declaration
[ClassReference(IsReviewed = false)]
public PercentDisplayMode PercentDisplayMode { get; set; }
Property Value
Type | Description |
---|---|
PercentDisplayMode | The Default value is PercentDisplayMode. |
SelectAllOnFocus
Gets or sets a value indicating whether the Syncfusion.UI.Xaml.Controls.Input.NumericTextBox SelectAllOnFocus values.
Declaration
[ClassReference(IsReviewed = false)]
public bool SelectAllOnFocus { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if SelectAllOnFocus value; otherwise, false. |
Value
Gets or sets the value of the input field.
Declaration
public object Value { get; set; }
Property Value
Type |
---|
System.Object |
ValueChangedMode
Gets or sets the Value changed mode
Declaration
public ValueChange ValueChangedMode { get; set; }
Property Value
Type | Description |
---|---|
ValueChange | The default value is OnKeyFocus |
Methods
add_CustomContextMenuOpening(CancelEventHandler)
Declaration
public void add_CustomContextMenuOpening(CancelEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
CancelEventHandler | value |
add_Pasting(CancelEventHandler)
Declaration
public void add_Pasting(CancelEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
CancelEventHandler | value |
add_ValueChanged(ValueChangedEventHandler)
Declaration
public void add_ValueChanged(ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventHandler | value |
CheckPercentDisplayMode()
Checks whether FormatString=="P" and PercentDisplayMode is Value
Declaration
public bool CheckPercentDisplayMode()
Returns
Type | Description |
---|---|
System.Boolean | return text. |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Dispose method.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | boolean type |
OnApplyTemplate()
Initializes all the child elements of Syncfusion.UI.Xaml.Controls.Input.NumericTextBox control.
Declaration
protected override void OnApplyTemplate()
Overrides
OnDoubleTapped(DoubleTappedRoutedEventArgs)
Declaration
protected override void OnDoubleTapped(DoubleTappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs | e |
OnFormatStringChanged(DependencyPropertyChangedEventArgs)
Occurs when the FormatString has changed
Declaration
protected virtual void OnFormatStringChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | Dependency property changed event args |
OnGotFocus(RoutedEventArgs)
Occurs when the focus is obtained
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.RoutedEventArgs | e | Routed event args |
Overrides
OnIntermediateValueChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Occurs when the Intermediate value has changed
Declaration
public static void OnIntermediateValueChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | obj | Dependency object |
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | Dependency property changed event args |
OnKeyDown(KeyRoutedEventArgs)
Occurs when the key is pressed
Declaration
protected override void OnKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | e | Key routed event args |
Overrides
OnKeyUp(KeyRoutedEventArgs)
On key up method
Declaration
protected override void OnKeyUp(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | e | Key routed event args |
OnLostFocus(RoutedEventArgs)
Occurs when the focus is lost
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.RoutedEventArgs | e | Routed event args |
Overrides
OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)
Declaration
protected override void OnManipulationCompleted(ManipulationCompletedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs | e |
OnMaximumNumberDecimalDigitsChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Occurs when the Maximum number of decimal digits has changed
Declaration
public static void OnMaximumNumberDecimalDigitsChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | obj | dependency object |
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | dependency property changed event args |
OnMaximumNumberDecimalDigitsChanged(DependencyPropertyChangedEventArgs)
Occurs when the Maximum number of decimal digits has changed
Declaration
protected void OnMaximumNumberDecimalDigitsChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | Dependency property changed event args |
OnPointerPressed(PointerRoutedEventArgs)
Occurs when the pointer is pressed
Declaration
protected override void OnPointerPressed(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | pointer routed event args |
Overrides
OnTapped(TappedRoutedEventArgs)
Declaration
protected override void OnTapped(TappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.TappedRoutedEventArgs | e |
OnValueChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Occurs when the Value has changed
Declaration
public static void OnValueChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | obj | Dependency object |
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | Dependency property changed event args |
OnValueChanged(DependencyPropertyChangedEventArgs)
Occurs when the Value has changed
Declaration
protected void OnValueChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | Dependency property changed event args |
remove_CustomContextMenuOpening(CancelEventHandler)
Declaration
public void remove_CustomContextMenuOpening(CancelEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
CancelEventHandler | value |
remove_Pasting(CancelEventHandler)
Declaration
public void remove_Pasting(CancelEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
CancelEventHandler | value |
remove_ValueChanged(ValueChangedEventHandler)
Declaration
public void remove_ValueChanged(ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventHandler | value |
Events
CustomContextMenuOpening
Occurs when ContextMenu has been opened.
Declaration
[ClassReference(IsReviewed = false)]
public event CancelEventHandler CustomContextMenuOpening
Event Type
Type |
---|
CancelEventHandler |
Pasting
Occurs when Pasting operation has been invoked.
Declaration
[ClassReference(IsReviewed = false)]
public event CancelEventHandler Pasting
Event Type
Type |
---|
CancelEventHandler |
ValueChanged
Occurs when current Syncfusion.UI.Xaml.Controls.Input.NumericTextBox.Value is changed.
Declaration
[ClassReference(IsReviewed = false)]
public event ValueChangedEventHandler ValueChanged
Event Type
Type |
---|
ValueChangedEventHandler |