| 
10 | 10 |              xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"  | 
11 | 11 |              ResxExtension.DefaultResxName="Rubberduck.UI.RubberduckUI"   | 
12 | 12 |              Language="{UICulture}"  | 
 | 13 | +             Name="CodeExplorer"  | 
13 | 14 |              mc:Ignorable="d"   | 
14 | 15 |              d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance codeExplorer:CodeExplorerViewModel}">  | 
15 | 16 |     <UserControl.Resources>  | 
 | 
64 | 65 |             <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>  | 
65 | 66 |             <Setter Property="ContextMenu">  | 
66 | 67 |                 <Setter.Value>  | 
67 |  | -                    <ContextMenu>  | 
 | 68 | +                    <ContextMenu DataContext="{Binding DataContext, Source={x:Reference CodeExplorer}}">  | 
68 | 69 |                         <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Refresh}"  | 
69 | 70 |                                   Command="{Binding RefreshCommand}">  | 
70 | 71 |                             <MenuItem.Icon>  | 
71 | 72 |                                 <Image Source="../../Resources/arrow-circle-double.png" />  | 
72 | 73 |                             </MenuItem.Icon>  | 
73 | 74 |                         </MenuItem>  | 
74 | 75 |                         <Separator />  | 
75 |  | -                        <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Rename}" Command="{Binding RenameCommand}" />  | 
 | 76 | +                        <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Rename}"  | 
 | 77 | +                                  Command="{Binding RenameCommand}" />  | 
76 | 78 |                         <Separator />  | 
77 |  | -                        <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CodeExplorer_ContextMenu_AddTestModuleText}" Command="{Binding AddTestModuleCommand}" />  | 
 | 79 | +                        <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CodeExplorer_ContextMenu_AddTestModuleText}"  | 
 | 80 | +                                  Command="{Binding AddTestModuleCommand}" />  | 
78 | 81 |                         <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CodeExplorer_ContextMenu_AddStdModuleText}" Command="{Binding AddStdModuleCommand}" />  | 
79 | 82 |                         <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CodeExplorer_ContextMenu_AddClassModuleText}" Command="{Binding AddClsModuleCommand}" />  | 
80 | 83 |                         <MenuItem Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CodeExplorer_ContextMenu_AddFormText}" Command="{Binding AddFormCommand}" />  | 
 | 
385 | 388 |                   ItemContainerStyle="{StaticResource ShinyTreeView}"  | 
386 | 389 |                   HorizontalContentAlignment="Stretch"  | 
387 | 390 |                   MouseDoubleClick="TreeView_OnMouseDoubleClick"  | 
388 |  | -                  Style="{StaticResource CodeExplorerTreeViewStyle}">  | 
 | 391 | +                  Style="{StaticResource CodeExplorerTreeViewStyle}"  | 
 | 392 | +                  DataContext="{Binding ElementName=CodeExplorer, Path=DataContext}">  | 
389 | 393 |             <i:Interaction.Behaviors>  | 
390 | 394 |                 <controls:BindableSelectedItemBehavior SelectedItem="{Binding SelectedItem, Mode=TwoWay}" />  | 
391 | 395 |             </i:Interaction.Behaviors>  | 
 | 
0 commit comments