private void NumericTBEditor_OnIsKeyboardFocusWithinChanged(object sender, DependencyPropertyChangedEventArgs e) { var timeSpan = Value == null ? TimeSpan.Zero : Value.Value; if (IsKeyboardFocusWithin) { NumericTBEditor.SetCurrentValue(NumericTextBox.ValueProperty, timeSpan.GetTimeSpanPartValue(_activeTextBoxPart)); return; } NumericTBEditorContainer.SetCurrentValue(VisibilityProperty, Visibility.Collapsed); }
private void NumericTBEditor_OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { NumericTBEditorUnit.SetCurrentValue(TextBlock.TextProperty, _activeTextBoxPart.GetTimeSpanPartName()); NumericTBEditor.Focus(); }