|
8 | 8 | xmlns:controls="clr-namespace:Rubberduck.UI.Controls"
|
9 | 9 | xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
|
10 | 10 | xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
| 11 | + xmlns:converters="clr-namespace:Rubberduck.UI.Converters" |
11 | 12 | Language="{UICulture}"
|
12 | 13 | mc:Ignorable="d"
|
13 | 14 | d:DesignHeight="255" d:DesignWidth="455"
|
|
29 | 30 | <BitmapImage x:Key="RepeatLastRunImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/arrow-repeat.png" />
|
30 | 31 |
|
31 | 32 | <BitmapImage x:Key="ResetResultsImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/flask-undo.png" />
|
| 33 | + <BitmapImage x:Key="StopImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/control-stop-square.png" /> |
32 | 34 |
|
33 | 35 | <BitmapImage x:Key="AddIcon" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/flask--plus.png" />
|
34 | 36 | <BitmapImage x:Key="AddTestMethodIcon" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/flask.png" />
|
|
38 | 40 | <BitmapImage x:Key="GroupByLocationImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Custom/PNG/ObjectClass.png" />
|
39 | 41 | <BitmapImage x:Key="GroupByCategoryImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/tag-label-gray.png" />
|
40 | 42 |
|
| 43 | + <BitmapImage x:Key="ExpandAllImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/expand-all.png" /> |
| 44 | + <BitmapImage x:Key="CollapseAllImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/collapse-all.png" /> |
| 45 | + |
41 | 46 | <BitmapImage x:Key="CopyResultsImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/document-copy.png" />
|
42 | 47 |
|
43 | 48 | <local:TestOutcomeImageSourceConverter x:Key="OutcomeIconConverter" />
|
44 | 49 | <BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
|
| 50 | + <converters:BoolToHiddenVisibilityConverter x:Key="BoolToCollapsed"/> |
45 | 51 |
|
46 | 52 | <SolidColorBrush x:Key="ToolBarToggleButtonVerticalBackground" Color="Transparent" />
|
47 | 53 | <SolidColorBrush x:Key="ToolBarButtonHover" Color="#210080FF"/>
|
48 | 54 | <SolidColorBrush x:Key="ToolBarGripper" Color="#FF6D6D6D"/>
|
| 55 | + <SolidColorBrush x:Key="ToolBarVerticalBackground" Color="#FFEEF5FD"/> |
| 56 | + <SolidColorBrush x:Key="ToolBarToggleButtonHorizontalBackground" Color="#FFEEF5FD"/> |
| 57 | + <SolidColorBrush x:Key="ToolBarMenuBorder" Color="#FFB6BDC5"/> |
| 58 | + <SolidColorBrush x:Key="ToolBarSubMenuBackground" Color="#FFEEF5FD"/> |
| 59 | + |
49 | 60 | <Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
|
50 | 61 | <Setter Property="Background" Value="{StaticResource ToolBarToggleButtonVerticalBackground}"/>
|
51 | 62 | <Setter Property="MinHeight" Value="0"/>
|
|
81 | 92 | </DataTrigger>
|
82 | 93 | </Style.Triggers>
|
83 | 94 | </Style>
|
84 |
| - <SolidColorBrush x:Key="ToolBarVerticalBackground" Color="#FFEEF5FD"/> |
85 |
| - <SolidColorBrush x:Key="ToolBarToggleButtonHorizontalBackground" Color="#FFEEF5FD"/> |
| 95 | + |
86 | 96 | <Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
|
87 | 97 | <Setter Property="Background" Value="{StaticResource ToolBarToggleButtonHorizontalBackground}"/>
|
88 | 98 | <Setter Property="MinHeight" Value="0"/>
|
|
118 | 128 | </DataTrigger>
|
119 | 129 | </Style.Triggers>
|
120 | 130 | </Style>
|
121 |
| - <SolidColorBrush x:Key="ToolBarMenuBorder" Color="#FFB6BDC5"/> |
122 |
| - <SolidColorBrush x:Key="ToolBarSubMenuBackground" Color="#FFEEF5FD"/> |
| 131 | + |
123 | 132 | <Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
|
124 | 133 | <Setter Property="Template">
|
125 | 134 | <Setter.Value>
|
|
147 | 156 | </Setter.Value>
|
148 | 157 | </Setter>
|
149 | 158 | </Style>
|
| 159 | + |
150 | 160 | <Style x:Key="ToolBarMainPanelBorderStyle" TargetType="{x:Type Border}">
|
151 | 161 | <Setter Property="Margin" Value="0,0,11,0"/>
|
152 | 162 | <Setter Property="CornerRadius" Value="3,3,3,3"/>
|
|
156 | 166 | </DataTrigger>
|
157 | 167 | </Style.Triggers>
|
158 | 168 | </Style>
|
| 169 | + |
159 | 170 | <Style x:Key="ToolBarWithOverflowOnlyShowingWhenNeededStyle" TargetType="{x:Type ToolBar}">
|
160 | 171 | <Setter Property="Template">
|
161 | 172 | <Setter.Value>
|
|
224 | 235 | </DataTrigger>
|
225 | 236 | </Style.Triggers>
|
226 | 237 | </Style>
|
| 238 | + |
| 239 | + <Style x:Key="ToolbarImageOpacity" TargetType="Image" > |
| 240 | + <Setter Property="Height" Value="16" /> |
| 241 | + <Setter Property="Width" Value="16" /> |
| 242 | + <Setter Property="Margin" Value="2,0,2,0" /> |
| 243 | + <Style.Triggers> |
| 244 | + <Trigger Property="IsEnabled" Value="False"> |
| 245 | + <Setter Property="Opacity" Value="0.3" /> |
| 246 | + </Trigger> |
| 247 | + </Style.Triggers> |
| 248 | + </Style> |
227 | 249 | </UserControl.Resources>
|
228 | 250 |
|
229 | 251 | <Grid>
|
|
250 | 272 | </Style>
|
251 | 273 | </ToolBar.Resources>
|
252 | 274 |
|
253 |
| - <Button Command="{Binding RefreshCommand}"> |
254 |
| - <Image Source="{StaticResource RefreshImage}" /> |
| 275 | + <Button Command="{Binding RefreshCommand}" > |
| 276 | + <Image Source="{StaticResource RefreshImage}" Style="{StaticResource ToolbarImageOpacity}" /> |
255 | 277 | </Button>
|
256 | 278 |
|
257 | 279 | <Separator />
|
258 | 280 |
|
259 | 281 | <Menu Background="Transparent">
|
260 | 282 | <MenuItem VerticalAlignment="Center" Header="{Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_RunMenuButtonText}">
|
261 | 283 | <MenuItem.Icon>
|
262 |
| - <Image Source="{StaticResource RunImage}" /> |
| 284 | + <Image Source="{StaticResource RunImage}" Style="{StaticResource ToolbarImageOpacity}" /> |
263 | 285 | </MenuItem.Icon>
|
264 | 286 | <MenuItem Command="{Binding RunAllTestsCommand}" Header="{Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_RunMenuAllTests}">
|
265 | 287 | <MenuItem.Icon>
|
|
305 | 327 |
|
306 | 328 | <Separator />
|
307 | 329 |
|
308 |
| - <Button Command="{Binding ResetResultsCommand}"> |
309 |
| - <Image Source="{StaticResource ResetResultsImage}" /> |
| 330 | + <Button Command="{Binding CancelTestRunCommand}" > |
| 331 | + <Image Source="{StaticResource StopImage}" Style="{StaticResource ToolbarImageOpacity}" /> |
| 332 | + </Button> |
| 333 | + |
| 334 | + <Separator /> |
| 335 | + |
| 336 | + <Button Command="{Binding ResetResultsCommand}" > |
| 337 | + <Image Source="{StaticResource ResetResultsImage}" Style="{StaticResource ToolbarImageOpacity}" /> |
310 | 338 | <Button.ToolTip>
|
311 |
| - <TextBlock Text="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=TestExplorer_ResetButtonTooltip}" /> |
| 339 | + <TextBlock Text="{Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_ResetButtonTooltip}" /> |
312 | 340 | </Button.ToolTip>
|
313 | 341 | </Button>
|
314 | 342 |
|
|
317 | 345 | <Menu Background="Transparent">
|
318 | 346 | <MenuItem VerticalAlignment="Center" Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Add}">
|
319 | 347 | <MenuItem.Icon>
|
320 |
| - <Image Source="{StaticResource AddIcon}" /> |
| 348 | + <Image Source="{StaticResource AddIcon}" Style="{StaticResource ToolbarImageOpacity}" /> |
321 | 349 | </MenuItem.Icon>
|
322 | 350 | <MenuItem Command="{Binding AddTestModuleCommand}" Header="{Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_AddTestModule}">
|
323 | 351 | </MenuItem>
|
|
359 | 387 |
|
360 | 388 | <Separator />
|
361 | 389 |
|
| 390 | + <Button Name="CollapseAll" Command="{Binding CollapseAllCommand}" Margin="2" |
| 391 | + ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=InspectionResults_CollapseAll}"> |
| 392 | + <Image Source="{StaticResource CollapseAllImage}" Style="{StaticResource ToolbarImageOpacity}" /> |
| 393 | + </Button> |
| 394 | + |
| 395 | + <Button Name="ExpandAll" Command="{Binding ExpandAllCommand}" Margin="2" |
| 396 | + ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=InspectionResults_ExpandAll}"> |
| 397 | + <Image Source="{StaticResource ExpandAllImage}" Style="{StaticResource ToolbarImageOpacity}" /> |
| 398 | + </Button> |
| 399 | + |
| 400 | + <Separator /> |
| 401 | + |
362 | 402 | <Button Command="{Binding CopyResultsCommand}">
|
363 |
| - <Image Source="{StaticResource CopyResultsImage}" /> |
| 403 | + <Image Source="{StaticResource CopyResultsImage}" Style="{StaticResource ToolbarImageOpacity}" /> |
364 | 404 | <Button.ToolTip>
|
365 | 405 | <TextBlock Text="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_CopyToolTip}" />
|
366 | 406 | </Button.ToolTip>
|
|
478 | 518 | </DataGrid.ContextMenu>
|
479 | 519 | <i:Interaction.Behaviors>
|
480 | 520 | <local:TestExplorerRowMouseOverBehavior MouseOverTest="{Binding MouseOverTest, Mode=TwoWay}" MouseOverGroup="{Binding MouseOverGroup, Mode=TwoWay}" />
|
| 521 | + <controls:GroupItemExpandedBehavior ExpandedState="{Binding ExpandedState, Mode=TwoWay}" /> |
481 | 522 | </i:Interaction.Behaviors>
|
482 | 523 | </controls:GroupingGrid>
|
483 | 524 | </Grid>
|
|
0 commit comments