Browse Source

Refactoring context action pop-up focuses the first item in the drop down the first time it is displayed.

pull/2/head
mrward 15 years ago
parent
commit
74d70df355
  1. 1
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsControl.xaml
  2. 7
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsControl.xaml.cs

1
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsControl.xaml

@ -53,6 +53,7 @@ @@ -53,6 +53,7 @@
<TreeView x:Name="TreeView" ItemsSource="{Binding}" BorderThickness="0"
Loaded="TreeViewLoaded"
ItemTemplate="{Binding Path=ItemTemplate, RelativeSource={RelativeSource AncestorType={x:Type local:ContextActionsControl}}}">
<TreeView.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">

7
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsControl.xaml.cs

@ -33,6 +33,13 @@ namespace ICSharpCode.SharpDevelop.Refactoring @@ -33,6 +33,13 @@ namespace ICSharpCode.SharpDevelop.Refactoring
firstButton.Focus();
}
void TreeViewLoaded(object sender, RoutedEventArgs e)
{
if (TreeView.IsVisible) {
this.Focus();
}
}
void ActionButtonClick(object sender, RoutedEventArgs e)
{
if (ActionExecuted != null)

Loading…
Cancel
Save