Esempio n. 1
0
 private void BrowseExec(object sender, ExecutedRoutedEventArgs e)
 {
     BrowseDialog.FileName = PathPattern;
     if (BrowseDialog.ShowDialog().GetValueOrDefault(false))
     {
         PathPattern = BrowseDialog.FileName;
     }
     if (PathEditor != null)
     {
         PathEditor.Focus();
     }
 }
Esempio n. 2
0
        protected override void OnGotFocus(RoutedEventArgs e)
        {
            base.OnGotFocus(e);

            if ((!e.Handled) && (PathEditor != null))
            {
                if (e.OriginalSource == this)
                {
                    PathEditor.Focus();
                    e.Handled = true;
                }
            }
        }
Esempio n. 3
0
 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();
     }
 }
Esempio n. 4
0
 private void OnPathEditorHistoryDropDownClosed(object sender, EventArgs e)
 {
     PathEditor.Focus();
 }
Esempio n. 5
0
 private void OnPathEditorHistoryGotFocus(object sender, RoutedEventArgs e)
 {
     PathEditor.Focus();
 }