void FinishMove() { m_SearcherControl.TitleLabel.UnregisterCallback <MouseMoveEvent>(OnTitleMouseMove); m_SearcherControl.TitleLabel.UnregisterCallback <KeyDownEvent>(OnSearcherKeyDown); m_SearcherControl.TitleLabel.ReleaseMouse(); m_FocusedBefore?.Focus(); m_IsMouseDownOnTitle = false; }
void RestorePreviousFocus() { if (m_PreviouslyFocused != null) { m_PreviouslyFocused.Focus(); } }
//Next step: Make animations vs. state interpolations visibly different in the tree view private void TextBox_KeyDown(object sender, KeyEventArgs e) { if (e.Key == System.Windows.Input.Key.Enter) { // your event handler here e.Handled = true; // Make it lose and regain focus to apply the databainding Focusable.Focus(); //InterpolationTypeComboBox.Focus(); TimeTextBox.Focus(); } }