diff --git a/ILSpy/CreateListDialog.xaml b/ILSpy/CreateListDialog.xaml index b0c20d25d..179cd5a7e 100644 --- a/ILSpy/CreateListDialog.xaml +++ b/ILSpy/CreateListDialog.xaml @@ -5,8 +5,8 @@ WindowStartupLocation="CenterOwner" ResizeMode="NoResize" Width="300" - Height="150" - FocusManager.FocusedElement="{Binding ElementName=listView}"> + Height="150" + FocusManager.FocusedElement="{Binding ElementName=ListName}"> diff --git a/ILSpy/OpenListDialog.xaml b/ILSpy/OpenListDialog.xaml index 7a0626c62..23fd62b74 100644 --- a/ILSpy/OpenListDialog.xaml +++ b/ILSpy/OpenListDialog.xaml @@ -19,7 +19,7 @@ + Loaded="listView_Loaded" SelectionMode="Single" MouseDoubleClick="listView_MouseDoubleClick"> diff --git a/ILSpy/OpenListDialog.xaml.cs b/ILSpy/OpenListDialog.xaml.cs index 2481631be..18b47ca1d 100644 --- a/ILSpy/OpenListDialog.xaml.cs +++ b/ILSpy/OpenListDialog.xaml.cs @@ -19,6 +19,7 @@ using System.Windows; using System.Windows.Controls; using Mono.Cecil; +using System.Windows.Input; namespace ICSharpCode.ILSpy { @@ -180,5 +181,11 @@ namespace ICSharpCode.ILSpy manager.DeleteList(listView.SelectedItem.ToString()); } + private void listView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) + { + if (e.ChangedButton == MouseButton.Left && listView.SelectedItem != null) + this.DialogResult = true; + } + } }