// // Copyright 2014 Perforce Software Inc. // using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Perforce.View { /// /// Interaction logic for GoToPathForm.xaml /// public partial class GoToPathForm : UserControl { public GoToPathForm() { InitializeComponent(); } private void TextBox_GotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { if (e.KeyboardDevice.IsKeyDown(Key.Tab)) ((TextBox)sender).SelectAll(); } public Technewlogic.WpfDialogManagement.Contracts.ICustomContentDialog ParentDialog { get; set; } private void Textfield_KeyUp(object sender, KeyEventArgs e) { if (GoToField.Text.Trim().Length > 0) { ParentDialog.CanOk = true; } } } }