Esempio n. 1
0
 private void Textbox_Drop(object sender, System.Windows.DragEventArgs e)
 {
     WPF.TextBox tb = sender as WPF.TextBox;
     if (e.Data.GetDataPresent(System.Windows.DataFormats.FileDrop))
     {
         string[] files = (string[])e.Data.GetData(System.Windows.DataFormats.FileDrop);
         tb.Text = files[0];
     }
 }
Esempio n. 2
0
        private void Textbox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            WPF.TextBox         tb  = sender as WPF.TextBox;
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            System.Windows.Forms.DialogResult result = fbd.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                tb.Text = fbd.SelectedPath;
            }
        }