|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
6 | 6 | xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
7 | 7 | xmlns:codeExplorer="clr-namespace:Rubberduck.Navigation.CodeExplorer"
|
8 |
| - xmlns:controls="clr-namespace:Rubberduck.UI.Controls" |
9 |
| - xmlns:converters="clr-namespace:Rubberduck.UI.Converters" |
10 |
| - xmlns:local="clr-namespace:Rubberduck.UI.CodeExplorer" |
| 8 | + xmlns:controls="clr-namespace:Rubberduck.UI.Controls;assembly=" |
| 9 | + xmlns:converters="clr-namespace:Rubberduck.UI.Converters;assembly=" |
| 10 | + xmlns:local="clr-namespace:Rubberduck.UI.CodeExplorer;assembly=" |
11 | 11 | ResxExtension.DefaultResxName="Rubberduck.Resources.CodeExplorer.CodeExplorerUI"
|
12 | 12 | Language="{UICulture}"
|
13 | 13 | Name="CodeExplorer"
|
|
48 | 48 | <converters:BoolToHiddenVisibilityConverter x:Key="BoolToHiddenVisibility" />
|
49 | 49 | <converters:BooleanToDimmedBrushConverter x:Key="BooleanToDimmed" />
|
50 | 50 | <converters:TemplateCommandParameterToTupleConverter x:Key="TemplateCommandParameterToTuple" />
|
51 |
| - <converters:SearchImageSourceConverter x:Key="SearchToIcon" /> |
52 | 51 | <converters:InvertBoolValueConverter x:Key="NotBool" />
|
53 | 52 | <converters:CodeExplorerNodeToIconConverter x:Key="NodeToIcon" />
|
54 | 53 | <converters:AccessibilityToIconConverter x:Key="AccessibilityToIcon" />
|
|
64 | 63 | <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
|
65 | 64 | <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Black" />
|
66 | 65 |
|
67 |
| - <Style x:Key="PlaceHolder" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}"> |
68 |
| - <Setter Property="Template"> |
69 |
| - <Setter.Value> |
70 |
| - <ControlTemplate TargetType="{x:Type TextBox}"> |
71 |
| - <Grid> |
72 |
| - <TextBox Text="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
73 |
| - x:Name="textSource" |
74 |
| - Background="Transparent" |
75 |
| - Panel.ZIndex="2" |
76 |
| - VerticalContentAlignment="Center"/> |
77 |
| - <TextBox Text="{TemplateBinding Tag}" Background="{TemplateBinding Background}" Panel.ZIndex="1"> |
78 |
| - <TextBox.Style> |
79 |
| - <Style TargetType="{x:Type TextBox}"> |
80 |
| - <Setter Property="Foreground" Value="Transparent"/> |
81 |
| - <Setter Property="VerticalContentAlignment" Value="Center"/> |
82 |
| - <Style.Triggers> |
83 |
| - <DataTrigger Binding="{Binding Path=Text, Source={x:Reference textSource}}" Value=""> |
84 |
| - <Setter Property="Foreground" Value="LightGray"/> |
85 |
| - </DataTrigger> |
86 |
| - </Style.Triggers> |
87 |
| - </Style> |
88 |
| - </TextBox.Style> |
89 |
| - </TextBox> |
90 |
| - </Grid> |
91 |
| - </ControlTemplate> |
92 |
| - </Setter.Value> |
93 |
| - </Setter> |
94 |
| - <Setter Property="Margin" Value="0" /> |
95 |
| - <Setter Property="VerticalAlignment" Value="Center" /> |
96 |
| - </Style> |
97 |
| - |
98 | 66 | <CompositeCollection x:Key="AddModuleCommands">
|
99 | 67 | <MenuItem Header="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_AddVBFormText}"
|
100 | 68 | Command="{Binding AddVBFormCommand}"
|
|
419 | 387 | BorderBrush="{x:Static SystemColors.ActiveBorderBrush}"
|
420 | 388 | BorderThickness="1"
|
421 | 389 | Padding="2">
|
422 |
| - <Grid> |
423 |
| - <Grid.ColumnDefinitions> |
424 |
| - <ColumnDefinition Width="*" /> |
425 |
| - <ColumnDefinition Width="20" /> |
426 |
| - </Grid.ColumnDefinitions> |
427 |
| - <TextBox Name="SearchBox" Grid.Column="0"> |
428 |
| - <TextBox.Style> |
429 |
| - <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource PlaceHolder}"> |
430 |
| - <Setter Property="Height" Value="20" /> |
431 |
| - <Setter Property="Width" Value="Auto" /> |
432 |
| - <Setter Property="Tag" Value="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_SearchPlaceholder}" /> |
433 |
| - <Setter Property="Text" Value="{Binding Search, UpdateSourceTrigger=PropertyChanged}" /> |
434 |
| - </Style> |
435 |
| - </TextBox.Style> |
436 |
| - </TextBox> |
437 |
| - <Button Name="SearchButton" Grid.Column="1" Command="{Binding ClearSearchCommand}" |
438 |
| - BorderBrush="{x:Static SystemColors.ControlLightBrush}" |
439 |
| - Background="Transparent" |
440 |
| - Width="20" Height="20" Padding="0" Margin="0,1"> |
441 |
| - <Image VerticalAlignment="Center" HorizontalAlignment="Center" |
442 |
| - Width="16" Height="16" Source="{Binding Search, Converter={StaticResource SearchToIcon}, UpdateSourceTrigger=PropertyChanged}" /> |
443 |
| - <i:Interaction.Behaviors> |
444 |
| - <controls:FocusElementAfterClickBehavior FocusElement="{Binding ElementName=SearchBox, Mode=OneWay}"/> |
445 |
| - </i:Interaction.Behaviors> |
446 |
| - </Button> |
447 |
| - </Grid> |
| 390 | + <controls:SearchBox x:Name="SearchBox" |
| 391 | + Background="{x:Static SystemColors.WindowBrush}" |
| 392 | + Text="{Binding Search, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 393 | + Hint="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, |
| 394 | + Key=CodeExplorer_SearchPlaceholder}" |
| 395 | + Grid.Column="0" |
| 396 | + Width="Auto"/> |
448 | 397 | </Border>
|
449 | 398 |
|
450 | 399 | <TreeView x:Name="ProjectTree"
|
|
0 commit comments