Skip to content

Commit ebbc8e5

Browse files
authored
Merge pull request #3396 from IvenBach/FindSymbolIssues
FindSymbol focus on searchComboBox
2 parents b7b6760 + 53db025 commit ebbc8e5

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

RetailCoder.VBE/UI/FindSymbol/FindSymbolControl.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
<ColumnDefinition Width="32" />
2222
</Grid.ColumnDefinitions>
2323

24-
<ComboBox IsEditable="True"
24+
<ComboBox x:Name="searchComboBox"
25+
IsEditable="True"
2526
ItemsSource="{Binding MatchResults}"
2627
SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
2728
IsTextSearchCaseSensitive="False"

RetailCoder.VBE/UI/FindSymbol/FindSymbolControl.xaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public partial class FindSymbolControl : UserControl
1111
public FindSymbolControl()
1212
{
1313
InitializeComponent();
14+
Loaded += FindSymbolControl_Loaded;
1415
}
1516

1617
private FindSymbolViewModel ViewModel { get { return (FindSymbolViewModel)DataContext; } }
@@ -43,5 +44,10 @@ private void UIElement_OnPreviewKeyDown(object sender, KeyEventArgs e)
4344
e.Handled = true;
4445
}
4546
}
47+
48+
private void FindSymbolControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
49+
{
50+
searchComboBox.Focus();
51+
}
4652
}
47-
}
53+
}

RetailCoder.VBE/UI/FindSymbol/FindSymbolDialog.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private void viewModel_Navigate(object sender, NavigateCodeEventArgs e)
2626
public FindSymbolDialog()
2727
{
2828
InitializeComponent();
29-
29+
3030
Text = string.Format("Rubberduck - {0}", RubberduckUI.FindSymbolDialog_Caption);
3131
}
3232

@@ -40,4 +40,4 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
4040
return base.ProcessCmdKey(ref msg, keyData);
4141
}
4242
}
43-
}
43+
}

RetailCoder.VBE/UI/FindSymbol/FindSymbolViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public string SearchString
8383
get { return _searchString; }
8484
set
8585
{
86-
//Adding SelectedItem.set() will allow pasting to work?
8786
SearchResult firstResult = GetSearchResultCollectionOfString(value).FirstOrDefault();
8887
SelectedItem = firstResult;
8988

0 commit comments

Comments
 (0)