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 NewFolderForm.xaml /// public partial class NewFolderForm : UserControl { public Technewlogic.WpfDialogManagement.Contracts.ICustomContentDialog ParentDialog { get; set; } public NewFolderForm() { InitializeComponent(); } private void NewFolderForm_Loaded(object sender, RoutedEventArgs e) { Keyboard.Focus(NewDirName); } private void Textfield_KeyUp(object sender, KeyEventArgs e) { if (NewDirName.Text.Trim().Length > 0) { ParentDialog.CanOk = true; } else { ParentDialog.CanOk = false; } } } }