We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e7b9e6 commit 7633e09Copy full SHA for 7633e09
MaterialDesignThemes.Wpf/TimePicker.cs
@@ -56,7 +56,12 @@ private static void TextPropertyChangedCallback(DependencyObject dependencyObjec
56
if (!timePicker._isManuallyMutatingText)
57
timePicker.SetSelectedTime();
58
if (timePicker._textBox != null)
59
+ {
60
+ // Save and restore the cursor position
61
+ var caretIndex = timePicker._textBox.CaretIndex;
62
timePicker._textBox.Text = dependencyPropertyChangedEventArgs.NewValue as string ?? "";
63
+ timePicker._textBox.CaretIndex = caretIndex;
64
+ }
65
}
66
67
public string Text
0 commit comments