ClassRadNumericBox
Represents a special RangeControlBase implementation that allows for numeric input. The control consists of a TextBox part which may be edited with numerical value directly and two buttons to increase/decrease the current value.
Definition
Namespace:Telerik.UI.Xaml.Controls.Input
Assembly:Telerik.WinUI.Controls.dll
Syntax:
public class RadNumericBox : RangeInputBase
Inheritance: objectRadControlRadHeaderedControlRangeControlBaseRangeInputBaseRadNumericBox
Inherited Members
Constructors
RadNumericBox()
Initializes a new instance of the RadNumericBox class.
Declaration
public RadNumericBox()
Fields
AcceptsDecimalSeparatorProperty
Identifies the AcceptsDecimalSeparator dependency property.
Declaration
public static readonly DependencyProperty AcceptsDecimalSeparatorProperty
Field Value
DependencyProperty
AllowNullValueProperty
Identifies the AllowNullValue dependency property.
Declaration
public static readonly DependencyProperty AllowNullValueProperty
Field Value
DependencyProperty
ButtonsVisibilityProperty
Identifies the ButtonsVisibility dependency property.
Declaration
public static readonly DependencyProperty ButtonsVisibilityProperty
Field Value
DependencyProperty
DecimalSeparatorKeyProperty
Identifies the DecimalSeparatorKey dependency property.
Declaration
public static readonly DependencyProperty DecimalSeparatorKeyProperty
Field Value
DependencyProperty
DecreaseButtonStyleProperty
Identifies the DecreaseButtonStyle dependency property.
Declaration
public static readonly DependencyProperty DecreaseButtonStyleProperty
Field Value
DependencyProperty
IncreaseButtonStyleProperty
Identifies the IncreaseButtonStyle dependency property.
Declaration
public static readonly DependencyProperty IncreaseButtonStyleProperty
Field Value
DependencyProperty
InputScopeProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty InputScopeProperty
Field Value
DependencyProperty
IsEditableProperty
Identifies the IsEditable dependency property.
Declaration
public static readonly DependencyProperty IsEditableProperty
Field Value
DependencyProperty
TextBoxVisibilityProperty
Identifies the TextBoxVisibility dependency property.
Declaration
public static readonly DependencyProperty TextBoxVisibilityProperty
Field Value
DependencyProperty
ValueFormatProperty
Identifies the ValueFormat dependency property.
Declaration
public static readonly DependencyProperty ValueFormatProperty
Field Value
DependencyProperty
ValueFormatSelectorProperty
Identifies the ValueFormatSelector dependency property.
Declaration
public static readonly DependencyProperty ValueFormatSelectorProperty
Field Value
DependencyProperty
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
DependencyProperty
ValueStringProperty
Identifies the ValueString dependency property.
Declaration
public static readonly DependencyProperty ValueStringProperty
Field Value
DependencyProperty
WatermarkProperty
Identifies the Watermark dependency property.
Declaration
public static readonly DependencyProperty WatermarkProperty
Field Value
DependencyProperty
WatermarkTemplateProperty
Identifies the WatermarkTemplate dependency property.
Declaration
public static readonly DependencyProperty WatermarkTemplateProperty
Field Value
DependencyProperty
Properties
AcceptsDecimalSeparator
Gets or sets a value indicating whether the TextBox part of the component may be directly edited through the keyboard.
AllowNullValue
Gets or sets a value indicating whether the Value property may be set to null.
ButtonsVisibility
Gets or sets the Visibility value for the Increase and Decrease buttons. The default value is Visible.
Declaration
public Visibility ButtonsVisibility { get; set; }
Property Value
Visibility
Example
<telerikInput:RadNumericBox x:Name="numericBox" ButtonsVisibility="Collapsed"/>
this.numericBox.ButtonsVisibility = Visibility.Collapsed;
DecreaseButtonStyle
Gets or sets the Style object that defines the appearance of the DecreaseButton control part. The TargetType of the Style object should point to the InlineButton type.
Declaration
public Style DecreaseButtonStyle { get; set; }
Property Value
Style
Example
<telerikInput:RadNumericBox.DecreaseButtonStyle>
<Style TargetType="PrimitivesCommon:InlineButton">
<Setter Property="Background" Value="Red"/>
<Setter Property="Width" Value="35"/>
<Setter Property="Height" Value="35"/>
</Style>
</telerikInput:RadNumericBox.DecreaseButtonStyle>
IncreaseButtonStyle
Gets or sets the Style object that defines the appearance of the IncreaseButton control part. The TargetType of the Style object should point to the InlineButton type.
Declaration
public Style IncreaseButtonStyle { get; set; }
Property Value
Style
Example
<telerikInput:RadNumericBox.IncreaseButtonStyle>
<Style TargetType="PrimitivesCommon:InlineButton">
<Setter Property="Background" Value="Red"/>
<Setter Property="Width" Value="35"/>
<Setter Property="Height" Value="35"/>
</Style>
</telerikInput:RadNumericBox.IncreaseButtonStyle>
InputScope
Gets or sets the context for input used by this RadNumericBox.
Declaration
public InputScopeNameValue InputScope { get; set; }
Property Value
InputScopeNameValue
IsEditable
Gets or sets a value indicating whether the TextBox part of the component can be directly edited through the keyboard. The default value is true.
Declaration
public bool IsEditable { get; set; }
Property Value
Example
<telerikInput:RadNumericBox x:Name="numericBox" IsEditable="False"/>
C#
this.numericBox.IsEditable = false;
TextBoxVisibility
Gets or sets the Visibility value for the TextBox part. The default value is Visible.
Declaration
public Visibility TextBoxVisibility { get; set; }
Property Value
Visibility
Example
<telerikInput:RadNumericBox x:Name="numericBox" TextBoxVisibility="Collapsed"/>
this.numericBox.TextBoxVisibility = Visibility.Collapsed;
Value
Gets or sets the currently displayed value. The value may be coerced to fit the current range restrictions.
Declaration
public double? Value { get; set; }
Property Value
The default value is 0.
ValueFormat
Gets or sets the string that is used to format the current Value of the component. The String.Format routine is used and the value specified should be in the form required by this method: { index[,alignment][ :formatString] }.
Declaration
public string ValueFormat { get; set; }
Property Value
Example
<telerikInput:RadNumericBox x:Name="numericBox" ValueFormat="{}{0:C}" />
C#
this.numericBox.ValueFormat = "{0:C}";
ValueFormatSelector
Gets or sets the IFormatSelector that is used to determine the format for the current Value of the component. The String.Format routine is used and the value specified should be in the form required by this method: { index[,alignment][ :formatString] }.
Declaration
public IFormatSelector ValueFormatSelector { get; set; }
Property Value
ValueString
Gets the current string representation of the Value property, as displayed in the TextBox part.
Watermark
Gets or sets the object that represents the Watermark displayed by the control. The Watermark is visible when the current Value is not set (null).
Declaration
public object Watermark { get; set; }
Property Value
The default value is null
Example
<telerikInput:RadNumericBox x:Name="numericBox" Watermark="WaterMark"/>
this.numericBox.Watermark = "WaterMark";
WatermarkTemplate
Gets or sets the DataTemplate instance that defines the appearance of the Watermark value.
Declaration
public DataTemplate WatermarkTemplate { get; set; }
Property Value
DataTemplate
Example
<telerikInput:RadNumericBox x:Name="numericBox">
<telerikInput:RadNumericBox.WatermarkTemplate>
<DataTemplate>
<Ellipse Width="20" Height="20" Fill="Red" Stroke="Red"/>
</DataTemplate>
</telerikInput:RadNumericBox.WatermarkTemplate>
</telerikInput:RadNumericBox>
Methods
ApplyTemplateCore()
Called when the Framework is called. Inheritors should override this method should they have some custom template-related logic. This is done to ensure that the property is properly initialized.
ComposeVisualStateName()
Builds the current visual state for this instance.
Declaration
protected override string ComposeVisualStateName()
Returns
Overrides
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
Overrides
OnGotFocus(RoutedEventArgs)
Called before the GotFocus event occurs.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
The data for the event.
OnPointerWheelChanged(PointerRoutedEventArgs)
Called before the PointerWheelChanged event occurs.
Declaration
protected override void OnPointerWheelChanged(PointerRoutedEventArgs e)
Parameters
e
PointerRoutedEventArgs
Event data for the event.
OnTemplateApplied()
Occurs when the method has been called and the template is already successfully applied.
Declaration
protected override void OnTemplateApplied()
Overrides
OnValueChanged()
Occurs when the property has changed. Raises the event.
Declaration
protected virtual void OnValueChanged()
UnapplyTemplateCore()
Removes the current control template. Occurs when a template has already been applied and a new one is applied.
Declaration
protected override void UnapplyTemplateCore()
Overrides
Events
ValueChanged
Occurs when the current value has changed.