|
8 | 8 | xmlns:controls="clr-namespace:Rubberduck.UI.Controls"
|
9 | 9 | xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
|
10 | 10 | xmlns:converters="clr-namespace:Rubberduck.UI.Converters"
|
| 11 | + xmlns:codeExplorerConverters="clr-namespace:Rubberduck.UI.CodeExplorer.Converters" |
11 | 12 | ResxExtension.DefaultResxName="Rubberduck.UI.RubberduckUI"
|
12 | 13 | Language="{UICulture}"
|
13 | 14 | Name="CodeExplorer"
|
|
28 | 29 | <BitmapImage x:Key="AddStdModuleImage" UriSource="../../Resources/Custom/PNG/AddModule.png" />
|
29 | 30 | <BitmapImage x:Key="AddClassModuleImage" UriSource="../../Resources/Custom/PNG/AddClass.png" />
|
30 | 31 | <BitmapImage x:Key="AddUserFormImage" UriSource="../../Resources/Custom/PNG/AddForm.png" />
|
| 32 | + <BitmapImage x:Key="SearchImage" UriSource="../../Resources/magnifier-medium.png" /> |
31 | 33 |
|
32 | 34 | <BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
|
33 | 35 | <converters:BoolToHiddenVisibilityConverter x:Key="BoolToHiddenVisibility" />
|
| 36 | + <codeExplorerConverters:StringHasValueToVisibilityConverter x:Key="StringHasValueToVisibility" /> |
| 37 | + <codeExplorerConverters:StringHasNoValueToVisibilityConverter x:Key="StringHasNoValueToVisibility" /> |
34 | 38 |
|
35 | 39 | <LinearGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" EndPoint="0,1" StartPoint="0,0">
|
36 | 40 | <GradientStop Color="#FFD9F4FF" Offset="0"/>
|
|
48 | 52 | <Setter Property="BorderThickness" Value="1.5"/>
|
49 | 53 | <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
50 | 54 | <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
| 55 | + <Setter Property="Visibility" Value="{Binding IsVisible, Mode=OneWay, Converter={StaticResource BoolToVisibility}}" /> |
51 | 56 | <Setter Property="HorizontalAlignment" Value="Left" />
|
52 | 57 | <EventSetter Event="MouseDoubleClick" Handler="TreeView_OnMouseDoubleClick" />
|
53 | 58 | <EventSetter Event="MouseRightButtonDown" Handler="TreeView_OnMouseRightButtonDown" />
|
|
284 | 289 | </Setter>
|
285 | 290 | </Style>
|
286 | 291 |
|
| 292 | + <Style x:Key="XButtonStyle" TargetType="Button"> |
| 293 | + <Setter Property="Background" Value="Transparent"/> |
| 294 | + <Setter Property="BorderThickness" Value="0"/> |
| 295 | + <Setter Property="HorizontalContentAlignment" Value="Center"/> |
| 296 | + <Setter Property="VerticalContentAlignment" Value="Center"/> |
| 297 | + <Setter Property="Template"> |
| 298 | + <Setter.Value> |
| 299 | + <ControlTemplate TargetType="Button"> |
| 300 | + <Grid> |
| 301 | + <VisualStateManager.VisualStateGroups> |
| 302 | + <VisualStateGroup x:Name="CommonStates"> |
| 303 | + <VisualState x:Name="Normal"/> |
| 304 | + <VisualState x:Name="MouseOver"> |
| 305 | + <Storyboard> |
| 306 | + <ColorAnimation Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="PaleGoldenrod"/> |
| 307 | + <DoubleAnimation Duration="0" Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity" To="1"/> |
| 308 | + </Storyboard> |
| 309 | + </VisualState> |
| 310 | + <VisualState x:Name="Pressed"> |
| 311 | + <Storyboard> |
| 312 | + <ColorAnimation Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="PaleGoldenrod"/> |
| 313 | + <DoubleAnimation Duration="0" Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity" To="1"/> |
| 314 | + </Storyboard> |
| 315 | + </VisualState> |
| 316 | + </VisualStateGroup> |
| 317 | + <VisualStateGroup x:Name="FocusStates"> |
| 318 | + <VisualState x:Name="Focused"> |
| 319 | + <Storyboard> |
| 320 | + <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="1"/> |
| 321 | + </Storyboard> |
| 322 | + </VisualState> |
| 323 | + <VisualState x:Name="Unfocused" /> |
| 324 | + </VisualStateGroup> |
| 325 | + </VisualStateManager.VisualStateGroups> |
| 326 | + <Border x:Name="Background" CornerRadius="3" Background="White" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> |
| 327 | + <Grid Background="{TemplateBinding Background}" Margin="1"> |
| 328 | + <Border Opacity="0" x:Name="BackgroundAnimation" Background="PaleGoldenrod" /> |
| 329 | + </Grid> |
| 330 | + </Border> |
| 331 | + <ContentPresenter |
| 332 | + x:Name="contentPresenter" |
| 333 | + Content="{TemplateBinding Content}" |
| 334 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 335 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 336 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 337 | + Margin="{TemplateBinding Padding}"/> |
| 338 | + <Rectangle x:Name="DisabledVisualElement" RadiusX="3" RadiusY="3" Fill="#FFFFFFFF" Opacity="0" IsHitTestVisible="false" /> |
| 339 | + <Rectangle x:Name="FocusVisualElement" RadiusX="2" RadiusY="2" Margin="1" Stroke="PaleGoldenrod" StrokeThickness="1" Opacity="0" IsHitTestVisible="false" /> |
| 340 | + </Grid> |
| 341 | + </ControlTemplate> |
| 342 | + </Setter.Value> |
| 343 | + </Setter> |
| 344 | + </Style> |
287 | 345 | </ResourceDictionary>
|
288 | 346 | </UserControl.Resources>
|
289 | 347 |
|
290 | 348 | <Grid UseLayoutRounding="True">
|
291 | 349 | <Grid.RowDefinitions>
|
292 | 350 | <RowDefinition Height="30"/>
|
| 351 | + <RowDefinition Height="20"/> |
293 | 352 | <RowDefinition Height="*" MinHeight="64" />
|
294 | 353 | <RowDefinition Height="5"/>
|
295 | 354 | <RowDefinition Height="Auto" MinHeight="48"/>
|
|
431 | 490 | </ToolBar>
|
432 | 491 | </ToolBarTray>
|
433 | 492 |
|
434 |
| - <controls:EmptyUIRefresh Grid.Row="1" /> |
| 493 | + <TextBox Grid.Row="1" TextChanged="SearchBox_OnTextChanged" VerticalContentAlignment="Center" Name="SearchBox"></TextBox> |
| 494 | + <Image Grid.Row="1" Source="{StaticResource SearchImage}" HorizontalAlignment="Right" VerticalAlignment="Center" MaxHeight="16" Margin="0,0,1,0" MouseDown="SearchIcon_OnMouseDown" Visibility="{Binding ElementName=SearchBox, Path=Text.Length, Converter={StaticResource StringHasValueToVisibility}}" /> |
| 495 | + <Button Grid.Row="1" Style="{StaticResource XButtonStyle}" HorizontalAlignment="Right" VerticalAlignment="Center" Height="18" Width="18" Margin="0,1,1,0" Visibility="{Binding ElementName=SearchBox, Path=Text.Length, Converter={StaticResource StringHasNoValueToVisibility}}" Click="ButtonBase_OnClick">✕</Button> |
| 496 | + |
| 497 | + <controls:EmptyUIRefresh Grid.Row="2" /> |
435 | 498 |
|
436 | 499 | <TreeView x:Name="ProjectTree"
|
437 |
| - Grid.Row="1" |
| 500 | + Grid.Row="2" |
438 | 501 | Background="White"
|
439 | 502 | ItemContainerStyle="{StaticResource ShinyTreeView}"
|
440 | 503 | HorizontalContentAlignment="Stretch"
|
|
446 | 509 | </i:Interaction.Behaviors>
|
447 | 510 | </TreeView>
|
448 | 511 |
|
449 |
| - <controls:BusyIndicator Grid.Row="1" Width="120" Height="120" Visibility="{Binding IsBusy, Converter={StaticResource BoolToVisibility}}" /> |
| 512 | + <controls:BusyIndicator Grid.Row="2" Width="120" Height="120" Visibility="{Binding IsBusy, Converter={StaticResource BoolToVisibility}}" /> |
450 | 513 |
|
451 |
| - <GridSplitter Grid.Row="2" Height="5" ShowsPreview="True" Cursor="SizeNS" HorizontalAlignment="Stretch"/> |
| 514 | + <GridSplitter Grid.Row="3" Height="5" ShowsPreview="True" Cursor="SizeNS" HorizontalAlignment="Stretch"/> |
452 | 515 |
|
453 |
| - <Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="DimGray"> |
| 516 | + <Border Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="DimGray"> |
454 | 517 |
|
455 | 518 | <ScrollViewer Background="WhiteSmoke" VerticalScrollBarVisibility="Auto">
|
456 | 519 | <WrapPanel Orientation="Vertical" MinHeight="70" Background="WhiteSmoke">
|
|
0 commit comments