mask entry dialog has a drop-down list of possible extensions.

This commit is contained in:
morkt
2015-08-11 07:10:17 +04:00
parent 2f2bbb3dc0
commit f8fcf9fb21
2 changed files with 11 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace GARbro.GUI
@@ -12,16 +13,21 @@ namespace GARbro.GUI
public EnterMaskDialog (IEnumerable<string> mask_list)
{
InitializeComponent ();
// Mask.ItemsSource = mask_list;
Mask.ItemsSource = mask_list;
Mask.Text = "*.*";
Mask.SelectionStart = 2;
Mask.SelectionLength = 1;
FocusManager.SetFocusedElement (this, Mask);
}
private void Button_Click (object sender, RoutedEventArgs e)
{
this.DialogResult = true;
}
private void Mask_Loaded (object sender, RoutedEventArgs e)
{
var text_box = (TextBox)Mask.Template.FindName ("PART_EditableTextBox", Mask);
FocusManager.SetFocusedElement (this, text_box);
text_box.SelectionStart = 2;
text_box.SelectionLength = 1;
}
}
}