When the ShowTextBox property is set to False and the dark palette of the Windows 11 theme is applied, the borders become invisible.
Additionally, the current tab navigation will focus on the right button (increase) first and then the left button (decrease) when the text box is hidden via the ShowTextBox. The tab navigation behavior should be that the left button is focused first then the right one, when the RadNumericUpDown control receives the keyboard focus.
public class CustomRadCalendar : RadCalendar
{
public override void OnApplyTemplate()
{
var transitionPanel = GetTemplateChild("TransitionPanel") as TransitionPanel;
if (transitionPanel != null)
{
TouchManager.AddTouchDownEventHandler(transitionPanel, this.OnTransitionPanelTouchDown);
}
base.OnApplyTemplate();
}
private void OnTransitionPanelTouchDown(object sender, TouchEventArgs args)
{
args.Handled = true;
}
}
Currently, the control doesn't allow to paste numeric strings with leading and trailing white spaces. For example " 35 ".
To achieve this, you can subscribe the RadNumericUpDown control to the Pasting event and implement the pasting manually.
DataObject.AddPastingHandler(this.numericUpDown, OnNumericUpDownPaste);
private void OnNumericUpDownPaste(object sender, DataObjectPastingEventArgs e)
{
var copiedString = e.DataObject.GetData(typeof(string)) as string;
if (copiedString != null)
{
copiedString = copiedString.Trim();
double number = 0;
var success = double.TryParse(copiedString, out number);
if (success)
{
this.numericUpDown.SetCurrentValue(RadNumericUpDown.ValueProperty, number);
e.CancelCommand();
}
}
}
As a workaround you can change the NumberNegativePattern to the default one like so: System.Globalization.CultureInfo ci = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone(); ci.NumberFormat.NumberNegativePattern = 1; Thread.CurrentThread.CurrentCulture = ci; Thread.CurrentThread.CurrentUICulture = ci;
Available in LIB 2016.3.919 and also it would be available in 2016 R3 SP1.
Available in LIB version 2016.1.302, it will be also available in the 2016 Q2 Release.
Available in the 2015 Q3 SP.
The issue is fixed through the UpdateValueToMatchTextOnLostFocus dependency property, introduced in the 2015 Q2 SP1 release.