|
25 | 25 | <codeInspections:QuickFixCommandParametersToTupleConverter x:Key="QuickFixCommandParametersToTupleConverter" /> |
26 | 26 |
|
27 | 27 | <Style TargetType="MenuItem" x:Key="QuickFixCommandStyle"> |
28 | | - <Setter Property="Header" Value="{Binding Key, Converter={StaticResource InspectionsUIResourceConverter}}" /> |
| 28 | + <Setter Property="Header" Value="{Binding Key, Converter={DynamicResource InspectionsUIResourceConverter}}" /> |
29 | 29 | <Setter Property="CommandParameter"> |
30 | 30 | <Setter.Value> |
31 | | - <MultiBinding Converter="{StaticResource QuickFixCommandParametersToTupleConverter}"> |
| 31 | + <MultiBinding Converter="{DynamicResource QuickFixCommandParametersToTupleConverter}"> |
32 | 32 | <Binding Path="Fix" /> |
33 | 33 | <Binding ElementName="InspectionResultsGrid" Path="SelectedItems" /> |
34 | 34 | <!-- This is a hack to deal with the fact that a named element on the control cannot be accessed from the context menu of the element by name. --> |
|
37 | 37 | </Setter.Value> |
38 | 38 | </Setter> |
39 | 39 | <Setter Property="Command" Value="{Binding Command}"/> |
40 | | - <Setter Property="Visibility" Value="{Binding IsVisible, Converter={StaticResource BoolToVisibility}}"/> |
| 40 | + <Setter Property="Visibility" Value="{Binding IsVisible, Converter={DynamicResource BoolToVisibility}}"/> |
41 | 41 | </Style> |
42 | 42 |
|
43 | 43 | <Style TargetType="MenuItem" x:Key="QuickFixItemStyle"> |
44 | 44 | <Setter Property="Header" Value="{Binding Description}"/> |
45 | 45 | <Setter Property="Icon"> |
46 | 46 | <Setter.Value> |
47 | | - <Image Source="{Binding Fix, Converter={StaticResource QuickFixIconConverter}}" /> |
| 47 | + <Image Source="{Binding Fix, Converter={DynamicResource QuickFixIconConverter}}" /> |
48 | 48 | </Setter.Value> |
49 | 49 | </Setter> |
50 | 50 | <Setter Property="ItemsSource" Value="{Binding Commands}" /> |
51 | | - <Setter Property="ItemContainerStyle" Value="{StaticResource QuickFixCommandStyle}" /> |
| 51 | + <Setter Property="ItemContainerStyle" Value="{DynamicResource QuickFixCommandStyle}" /> |
52 | 52 | </Style> |
53 | 53 |
|
54 | 54 | <Style x:Key="IconMargin" TargetType="Image"> |
|
71 | 71 | <RowDefinition Height="Auto" MinHeight="48"/> |
72 | 72 | </Grid.RowDefinitions> |
73 | 73 |
|
74 | | - <Border Grid.Row="0" Grid.RowSpan="3" Background="{StaticResource ToolBarSubMenuBackgroundBrush}" /> |
| 74 | + <Border Grid.Row="0" Grid.RowSpan="3" Background="{DynamicResource ToolBarSubMenuBackgroundBrush}" /> |
75 | 75 |
|
76 | 76 | <ToolBarTray Grid.Row="0" IsLocked="True"> |
77 | | - <ToolBar Style="{StaticResource ToolBarWithOverflowOnlyShowingWhenNeededStyle}"> |
| 77 | + <ToolBar Style="{DynamicResource ToolBarWithOverflowOnlyShowingWhenNeededStyle}"> |
78 | 78 | <ToolBar.Resources> |
79 | 79 | <codeInspections:InspectionFilterToBooleanConverter x:Key="InspectionTypeToBooleanConverter" /> |
80 | 80 | <codeInspections:InspectionResultGroupingToBooleanConverter x:Key="GroupingToBooleanConverter" /> |
|
100 | 100 | </ToolBar.Resources> |
101 | 101 |
|
102 | 102 | <Button Command="{Binding RefreshCommand}"> |
103 | | - <Image Source="{StaticResource RefreshImage}" /> |
| 103 | + <Image Source="{DynamicResource RefreshImage}" /> |
104 | 104 | </Button> |
105 | 105 |
|
106 | 106 | <Separator /> |
107 | 107 | <Menu Background="Transparent"> |
108 | 108 | <MenuItem VerticalAlignment="Center" |
109 | | - HeaderTemplate="{StaticResource MenuItemHeaderDropdownIndicatorTemplate}" |
| 109 | + HeaderTemplate="{DynamicResource MenuItemHeaderDropdownIndicatorTemplate}" |
110 | 110 | ItemsSource="{Binding QuickFixes}" |
111 | 111 | Background="Transparent" |
112 | | - ItemContainerStyle="{StaticResource QuickFixItemStyle}"> |
| 112 | + ItemContainerStyle="{DynamicResource QuickFixItemStyle}"> |
113 | 113 | <MenuItem.Icon> |
114 | | - <Image Source="{StaticResource FixImage}" /> |
| 114 | + <Image Source="{DynamicResource FixImage}" /> |
115 | 115 | </MenuItem.Icon> |
116 | 116 | <MenuItem.Header> |
117 | 117 | <TextBlock Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Fix}" /> |
|
123 | 123 |
|
124 | 124 | <Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GroupingGrid_GroupingStyle}" VerticalContentAlignment="Center" /> |
125 | 125 |
|
126 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 126 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
127 | 127 | ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GroupingStyle_ByInspectionType}" |
128 | | - IsChecked="{Binding Path=Grouping, Converter={StaticResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Type}}"> |
129 | | - <Image Source="{StaticResource GroupByInspectionTypeImage}" /> |
| 128 | + IsChecked="{Binding Path=Grouping, Converter={DynamicResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Type}}"> |
| 129 | + <Image Source="{DynamicResource GroupByInspectionTypeImage}" /> |
130 | 130 | </ToggleButton> |
131 | 131 |
|
132 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 132 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
133 | 133 | ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GroupingStyle_ByName}" |
134 | | - IsChecked="{Binding Path=Grouping, Converter={StaticResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Name}}"> |
135 | | - <Image Source="{StaticResource GroupByInspectionImage}" /> |
| 134 | + IsChecked="{Binding Path=Grouping, Converter={DynamicResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Name}}"> |
| 135 | + <Image Source="{DynamicResource GroupByInspectionImage}" /> |
136 | 136 | </ToggleButton> |
137 | 137 |
|
138 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 138 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
139 | 139 | ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GroupingStyle_ByLocation}" |
140 | | - IsChecked="{Binding Path=Grouping, Converter={StaticResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Location}}"> |
141 | | - <Image Source="{StaticResource GroupByLocationImage}" /> |
| 140 | + IsChecked="{Binding Path=Grouping, Converter={DynamicResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Location}}"> |
| 141 | + <Image Source="{DynamicResource GroupByLocationImage}" /> |
142 | 142 | </ToggleButton> |
143 | 143 |
|
144 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 144 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
145 | 145 | ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GroupingStyle_BySeverity}" |
146 | | - IsChecked="{Binding Path=Grouping, Converter={StaticResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Severity}}"> |
147 | | - <Image Source="{StaticResource GroupBySeverityImage}" /> |
| 146 | + IsChecked="{Binding Path=Grouping, Converter={DynamicResource GroupingToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultGrouping.Severity}}"> |
| 147 | + <Image Source="{DynamicResource GroupBySeverityImage}" /> |
148 | 148 | </ToggleButton> |
149 | 149 |
|
150 | 150 | <Separator /> |
151 | 151 |
|
152 | | - <Image Source="{StaticResource FilterImage}" /> |
| 152 | + <Image Source="{DynamicResource FilterImage}" /> |
153 | 153 |
|
154 | 154 | <Label Content="{Resx ResxName=Rubberduck.CodeAnalysis.CodeAnalysisUI, Key=GroupingGrid_Filter}" VerticalContentAlignment="Center" /> |
155 | 155 |
|
|
158 | 158 |
|
159 | 159 | <Label Content="{Resx ResxName=Rubberduck.Resources.Inspections.InspectionsUI ,Key=CodeInspection_SeverityFilter}" /> |
160 | 160 |
|
161 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 161 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
162 | 162 | ToolTip="{Resx ResxName=Rubberduck.UI.Inspections.InspectionResultsUI, Key=FilterByError}" |
163 | | - IsChecked="{Binding Path=SelectedFilters, Converter={StaticResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Error}}"> |
164 | | - <Image Source="{StaticResource FilterByErrorImage}" /> |
| 163 | + IsChecked="{Binding Path=SelectedFilters, Converter={DynamicResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Error}}"> |
| 164 | + <Image Source="{DynamicResource FilterByErrorImage}" /> |
165 | 165 | </ToggleButton> |
166 | 166 |
|
167 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 167 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
168 | 168 | ToolTip="{Resx ResxName=Rubberduck.UI.Inspections.InspectionResultsUI, Key=FilterByWarning}" |
169 | | - IsChecked="{Binding Path=SelectedFilters, Converter={StaticResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Warning}}"> |
170 | | - <Image Source="{StaticResource FilterByWarningImage}" /> |
| 169 | + IsChecked="{Binding Path=SelectedFilters, Converter={DynamicResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Warning}}"> |
| 170 | + <Image Source="{DynamicResource FilterByWarningImage}" /> |
171 | 171 | </ToggleButton> |
172 | 172 |
|
173 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 173 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
174 | 174 | ToolTip="{Resx ResxName=Rubberduck.UI.Inspections.InspectionResultsUI, Key=FilterBySuggestion}" |
175 | | - IsChecked="{Binding Path=SelectedFilters, Converter={StaticResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Suggestion}}"> |
176 | | - <Image Source="{StaticResource FilterBySuggestionImage}" /> |
| 175 | + IsChecked="{Binding Path=SelectedFilters, Converter={DynamicResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Suggestion}}"> |
| 176 | + <Image Source="{DynamicResource FilterBySuggestionImage}" /> |
177 | 177 | </ToggleButton> |
178 | 178 |
|
179 | | - <ToggleButton Style="{StaticResource ToolBarToggleStyle}" |
| 179 | + <ToggleButton Style="{DynamicResource ToolBarToggleStyle}" |
180 | 180 | ToolTip="{Resx ResxName=Rubberduck.UI.Inspections.InspectionResultsUI, Key=FilterByHint}" |
181 | | - IsChecked="{Binding Path=SelectedFilters, Converter={StaticResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Hint}}"> |
182 | | - <Image Source="{StaticResource FilterByHintImage}" /> |
| 181 | + IsChecked="{Binding Path=SelectedFilters, Converter={DynamicResource InspectionTypeToBooleanConverter}, ConverterParameter={x:Static codeInspections:InspectionResultsFilter.Hint}}"> |
| 182 | + <Image Source="{DynamicResource FilterByHintImage}" /> |
183 | 183 | </ToggleButton> |
184 | 184 |
|
185 | 185 | <Separator /> |
186 | 186 |
|
187 | 187 | <Button Name="CollapseAll" Command="{Binding CollapseAllCommand}" Margin="2" |
188 | 188 | ToolTip="{Resx ResxName=Rubberduck.UI.Inspections.InspectionResultsUI, Key=CollapseAll}"> |
189 | | - <Image Source="{StaticResource CollapseAllImage}" /> |
| 189 | + <Image Source="{DynamicResource CollapseAllImage}" /> |
190 | 190 | </Button> |
191 | 191 |
|
192 | 192 | <Button Name="ExpandAll" Command="{Binding ExpandAllCommand}" Margin="2" |
193 | 193 | ToolTip="{Resx ResxName=Rubberduck.UI.Inspections.InspectionResultsUI, Key=ExpandAll}"> |
194 | | - <Image Source="{StaticResource ExpandAllImage}" /> |
| 194 | + <Image Source="{DynamicResource ExpandAllImage}" /> |
195 | 195 | </Button> |
196 | 196 |
|
197 | 197 | <Separator /> |
198 | 198 |
|
199 | 199 | <Button Command="{Binding CopyResultsCommand}"> |
200 | | - <Image Source="{StaticResource CopyResultsImage}" /> |
| 200 | + <Image Source="{DynamicResource CopyResultsImage}" /> |
201 | 201 | <Button.ToolTip> |
202 | 202 | <TextBlock Text="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_CopyToolTip}" /> |
203 | 203 | </Button.ToolTip> |
|
206 | 206 | <Separator /> |
207 | 207 |
|
208 | 208 | <Button ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Settings}" Command="{Binding OpenInspectionSettings}" BorderThickness="0" Background="Transparent"> |
209 | | - <Image Source="{StaticResource SettingsImage}" /> |
| 209 | + <Image Source="{DynamicResource SettingsImage}" /> |
210 | 210 | </Button> |
211 | 211 | </ToolBar> |
212 | 212 | </ToolBarTray> |
|
235 | 235 | <DataGridTemplateColumn Header="{Resx ResxName=Rubberduck.CodeAnalysis.CodeAnalysisUI, Key=CodeInspectionResults_Type}"> |
236 | 236 | <DataGridTemplateColumn.CellTemplate> |
237 | 237 | <DataTemplate DataType="inspections:IInspectionResult"> |
238 | | - <Image Source="{Binding Inspection, Converter={StaticResource InspectionIconConverter}, Mode=OneTime}" Width="16" Height="16" /> |
| 238 | + <Image Source="{Binding Inspection, Converter={DynamicResource InspectionIconConverter}, Mode=OneTime}" Width="16" Height="16" /> |
239 | 239 | </DataTemplate> |
240 | 240 | </DataGridTemplateColumn.CellTemplate> |
241 | 241 | </DataGridTemplateColumn> |
242 | 242 | <DataGridTextColumn Header="{Resx ResxName=Rubberduck.CodeAnalysis.CodeAnalysisUI, Key=CodeInspectionResults_Issue}" Binding="{Binding Description, Mode=OneTime}" /> |
243 | | - <DataGridTextColumn Header="{Resx ResxName=Rubberduck.CodeAnalysis.CodeAnalysisUI, Key=CodeInspectionResults_Location}" Binding="{Binding QualifiedSelection.QualifiedName, Mode=OneTime, Converter={StaticResource GroupingGridLocationConverter}}" /> |
| 243 | + <DataGridTextColumn Header="{Resx ResxName=Rubberduck.CodeAnalysis.CodeAnalysisUI, Key=CodeInspectionResults_Location}" Binding="{Binding QualifiedSelection.QualifiedName, Mode=OneTime, Converter={DynamicResource GroupingGridLocationConverter}}" /> |
244 | 244 | </DataGrid.Columns> |
245 | 245 | <DataGrid.ContextMenu> |
246 | 246 | <ContextMenu ItemsSource="{Binding PlacementTarget.DataContext.QuickFixes, RelativeSource={RelativeSource Self}}" |
247 | | - ItemContainerStyle="{StaticResource QuickFixItemStyle}" /> |
| 247 | + ItemContainerStyle="{DynamicResource QuickFixItemStyle}" /> |
248 | 248 | </DataGrid.ContextMenu> |
249 | 249 | <i:Interaction.Behaviors> |
250 | 250 | <controls:GroupItemExpandedBehavior ExpandedState="{Binding ExpandedState, Mode=TwoWay}" /> |
251 | 251 | </i:Interaction.Behaviors> |
252 | 252 | </controls:GroupingGrid> |
253 | 253 | </ScrollViewer> |
254 | | - <controls:EmptyUIRefresh Visibility="{Binding Unparsed, Converter={StaticResource BoolToVisibility}}" /> |
255 | | - <controls:BusyIndicator Width="120" Height="120" Visibility="{Binding IsBusy, Converter={StaticResource BoolToVisibility}}" /> |
| 254 | + <controls:EmptyUIRefresh Visibility="{Binding Unparsed, Converter={DynamicResource BoolToVisibility}}" /> |
| 255 | + <controls:BusyIndicator Width="120" Height="120" Visibility="{Binding IsBusy, Converter={DynamicResource BoolToVisibility}}" /> |
256 | 256 | </Grid> |
257 | 257 | </Border> |
258 | 258 |
|
259 | 259 | <GridSplitter Grid.Row="2" Height="5" ShowsPreview="True" Cursor="SizeNS" HorizontalAlignment="Stretch"/> |
260 | 260 |
|
261 | | - <Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="{StaticResource GrayBrush}"> |
| 261 | + <Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource GrayBrush}"> |
262 | 262 | <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"> |
263 | | - <StackPanel Orientation="Vertical" MinHeight="48" Background="{StaticResource BackgroundLightBrush}"> |
| 263 | + <StackPanel Orientation="Vertical" MinHeight="48" Background="{DynamicResource BackgroundLightBrush}"> |
264 | 264 | <Grid Margin="4" HorizontalAlignment="Stretch"> |
265 | 265 | <Grid.ColumnDefinitions> |
266 | 266 | <ColumnDefinition Width="25" /> |
267 | 267 | <ColumnDefinition /> |
268 | 268 | </Grid.ColumnDefinitions> |
269 | | - <Image Style="{StaticResource IconMargin}" VerticalAlignment="Top" Grid.Column="0" |
270 | | - Source="{Binding SelectedInspection.Severity, Converter={StaticResource SeverityIconConverter}}"/> |
| 269 | + <Image Style="{DynamicResource IconMargin}" VerticalAlignment="Top" Grid.Column="0" |
| 270 | + Source="{Binding SelectedInspection.Severity, Converter={DynamicResource SeverityIconConverter}}"/> |
271 | 271 | <TextBlock Grid.Column="1" Margin="4" Text="{Binding SelectedInspection.Description}" FontWeight="Bold" TextWrapping="WrapWithOverflow"/> |
272 | 272 | </Grid> |
273 | 273 |
|
274 | 274 | <TextBlock Margin="4" Text="{Binding SelectedInspection.Meta}" FontSize="10" TextWrapping="WrapWithOverflow"/> |
275 | 275 | <TextBlock Margin="8" Text="{Binding SelectedInspection.QualifiedSelection}" FontSize="10" TextWrapping="WrapWithOverflow" /> |
276 | 276 |
|
277 | 277 | <controls:LinkButton Margin="4" |
278 | | - Visibility="{Binding CanDisableInspection, Converter={StaticResource BoolToVisibility}}" |
| 278 | + Visibility="{Binding CanDisableInspection, Converter={DynamicResource BoolToVisibility}}" |
279 | 279 | Command="{Binding DisableInspectionCommand}" |
280 | 280 | Content="{Resx ResxName=Rubberduck.Resources.Inspections.InspectionsUI, Key=DisableThisInspection}" /> |
281 | 281 |
|
|
0 commit comments