private void BrowseExec(object sender, ExecutedRoutedEventArgs e) { BrowseDialog.FileName = PathPattern; if (BrowseDialog.ShowDialog().GetValueOrDefault(false)) { PathPattern = BrowseDialog.FileName; } if (PathEditor != null) { PathEditor.Focus(); } }
protected override void OnGotFocus(RoutedEventArgs e) { base.OnGotFocus(e); if ((!e.Handled) && (PathEditor != null)) { if (e.OriginalSource == this) { PathEditor.Focus(); e.Handled = true; } } }
private void InsertPlaceholderExec(object sender, ExecutedRoutedEventArgs e) { if (PathEditor == null) { PathPattern += (string)e.Parameter; //Fallback position, just append the placeholder to the path text } else { //If there is a path editor text box, put the placeholder at the insertion point PathEditor.SelectedText = (string)e.Parameter; PathEditor.Select(PathEditor.SelectionStart + PathEditor.SelectionLength, 0); PathEditor.Focus(); } }
private void OnPathEditorHistoryDropDownClosed(object sender, EventArgs e) { PathEditor.Focus(); }
private void OnPathEditorHistoryGotFocus(object sender, RoutedEventArgs e) { PathEditor.Focus(); }