Skip to content

Commit 945789a

Browse files
committed
fix illegal dynamic resources
1 parent e009ac7 commit 945789a

File tree

17 files changed

+45
-45
lines changed

17 files changed

+45
-45
lines changed

Rubberduck.Core/UI/CodeExplorer/CodeExplorerControl.xaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@
148148
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_AddTemplatesSubMenu}" IsEnabled="{Binding AnyTemplatesCanExecute}">
149149
<MenuItem.ItemsSource>
150150
<CompositeCollection>
151-
<CollectionContainer Collection="{Binding Source={DynamicResource BuiltInTemplatesViewSource}}" />
152-
<CollectionContainer Collection="{Binding Source={DynamicResource UserDefinedTemplatesViewSource}, Mode=OneWay}" />
151+
<CollectionContainer Collection="{Binding Source={StaticResource BuiltInTemplatesViewSource}}" />
152+
<CollectionContainer Collection="{Binding Source={StaticResource UserDefinedTemplatesViewSource}, Mode=OneWay}" />
153153
</CompositeCollection>
154154
</MenuItem.ItemsSource>
155155
<MenuItem.ItemContainerStyle>
@@ -159,7 +159,7 @@
159159
<Setter Property="ToolTip" Value="{Binding Description}" />
160160
<Setter Property="CommandParameter">
161161
<Setter.Value>
162-
<MultiBinding Converter="{DynamicResource TemplateCommandParameterToTuple}">
162+
<MultiBinding Converter="{StaticResource TemplateCommandParameterToTuple}">
163163
<Binding Path="Name" />
164164
<Binding Path="DataContext.SelectedItem" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
165165
</MultiBinding>
@@ -182,7 +182,7 @@
182182
<Setter Property="BorderThickness" Value="0" />
183183
</Style>
184184

185-
<Style x:Key="ToolbarImageOpacity" TargetType="Image" BasedOn="{DynamicResource ToolbarIconStyle}">
185+
<Style x:Key="ToolbarImageOpacity" TargetType="Image" BasedOn="{StaticResource ToolbarIconStyle}">
186186
<Setter Property="Margin" Value="0" />
187187
<Style.Triggers>
188188
<Trigger Property="IsEnabled" Value="False">
@@ -355,27 +355,27 @@
355355
<MenuItem.Items>
356356
<MenuItem IsCheckable="True" Header="8" Style="{DynamicResource MenuItemStyle}">
357357
<MenuItem.IsChecked>
358-
<Binding Path="FontSize" Converter="{DynamicResource BoolToDouble}" Mode="TwoWay" ConverterParameter="8" />
358+
<Binding Path="FontSize" Converter="{StaticResource BoolToDouble}" Mode="TwoWay" ConverterParameter="8" />
359359
</MenuItem.IsChecked>
360360
</MenuItem>
361361
<MenuItem IsCheckable="True" Header="10" Style="{DynamicResource MenuItemStyle}">
362362
<MenuItem.IsChecked>
363-
<Binding Path="FontSize" Converter="{DynamicResource BoolToDouble}" Mode="TwoWay" ConverterParameter="10" />
363+
<Binding Path="FontSize" Converter="{StaticResource BoolToDouble}" Mode="TwoWay" ConverterParameter="10" />
364364
</MenuItem.IsChecked>
365365
</MenuItem>
366366
<MenuItem IsCheckable="True" Header="12" Style="{DynamicResource MenuItemStyle}">
367367
<MenuItem.IsChecked>
368-
<Binding Path="FontSize" Converter="{DynamicResource BoolToDouble}" Mode="TwoWay" ConverterParameter="12" />
368+
<Binding Path="FontSize" Converter="{StaticResource BoolToDouble}" Mode="TwoWay" ConverterParameter="12" />
369369
</MenuItem.IsChecked>
370370
</MenuItem>
371371
<MenuItem IsCheckable="True" Header="14" Style="{DynamicResource MenuItemStyle}">
372372
<MenuItem.IsChecked>
373-
<Binding Path="FontSize" Converter="{DynamicResource BoolToDouble}" Mode="TwoWay" ConverterParameter="14" />
373+
<Binding Path="FontSize" Converter="{StaticResource BoolToDouble}" Mode="TwoWay" ConverterParameter="14" />
374374
</MenuItem.IsChecked>
375375
</MenuItem>
376376
<MenuItem IsCheckable="True" Header="16" Style="{DynamicResource MenuItemStyle}">
377377
<MenuItem.IsChecked>
378-
<Binding Path="FontSize" Converter="{DynamicResource BoolToDouble}" Mode="TwoWay" ConverterParameter="16" />
378+
<Binding Path="FontSize" Converter="{StaticResource BoolToDouble}" Mode="TwoWay" ConverterParameter="16" />
379379
</MenuItem.IsChecked>
380380
</MenuItem>
381381
</MenuItem.Items>
@@ -419,7 +419,7 @@
419419
Background="{DynamicResource BackgroundWhiteBrush}"
420420
HorizontalContentAlignment="Stretch"
421421
ItemsSource="{Binding Projects}"
422-
ItemContainerStyle="{DynamicResource TreeViewContainerStyle}"
422+
ItemContainerStyle="{StaticResource TreeViewContainerStyle}"
423423
FontSize="{Binding FontSize, Mode=OneWay}"
424424
BorderThickness="0,1"
425425
VirtualizingPanel.IsVirtualizing="False"
@@ -455,7 +455,7 @@
455455
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_Annotate}" IsEnabled="{Binding CanBeAnnotated}">
456456
<MenuItem.ItemsSource>
457457
<CompositeCollection>
458-
<CollectionContainer Collection="{Binding Source={DynamicResource AnnotationsViewSource}}" />
458+
<CollectionContainer Collection="{Binding Source={StaticResource AnnotationsViewSource}}" />
459459
</CompositeCollection>
460460
</MenuItem.ItemsSource>
461461
<MenuItem.ItemContainerStyle>
@@ -464,15 +464,15 @@
464464
<Setter Property="Header" Value="{Binding Path=., Converter={StaticResource AnnotationToCodeString}}" />
465465
<Setter Property="CommandParameter">
466466
<Setter.Value>
467-
<MultiBinding Converter="{DynamicResource AnnotateDeclarationCommandParameterToTuple}">
467+
<MultiBinding Converter="{StaticResource AnnotateDeclarationCommandParameterToTuple}">
468468
<Binding Path="." />
469469
<Binding Path="DataContext.SelectedItem" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
470470
</MultiBinding>
471471
</Setter.Value>
472472
</Setter>
473473
<Setter Property="Visibility">
474474
<Setter.Value>
475-
<MultiBinding Converter ="{DynamicResource AnnotateDeclarationCommandVisibility}">
475+
<MultiBinding Converter="{StaticResource AnnotateDeclarationCommandVisibility}">
476476
<Binding Path="." />
477477
<Binding Path="DataContext.SelectedItem" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
478478
</MultiBinding>
@@ -595,9 +595,9 @@
595595
</ContextMenu>
596596
</TreeView.ContextMenu>
597597
<TreeView.ItemTemplate>
598-
<HierarchicalDataTemplate DataType="codeExplorer:ICodeExplorerNode" ItemsSource="{Binding Children}" ItemContainerStyle="{DynamicResource TreeViewContainerStyle}">
598+
<HierarchicalDataTemplate DataType="codeExplorer:ICodeExplorerNode" ItemsSource="{Binding Children}" ItemContainerStyle="{StaticResource TreeViewContainerStyle}">
599599
<HierarchicalDataTemplate.Resources>
600-
<Style x:Key="TreeViewItemStyleModified" TargetType="{x:Type TextBlock}" BasedOn="{DynamicResource TreeViewItemStyle}">
600+
<Style x:Key="TreeViewItemStyleModified" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource TreeViewItemStyle}">
601601
<Setter Property="Text" Value="{Binding Name}" />
602602
<Style.Triggers>
603603
<DataTrigger Binding="{Binding ElementName=DisplaySignatures, Path=IsChecked}" Value="True">
@@ -611,7 +611,7 @@
611611
<Image Style="{DynamicResource ToolbarIconStyle}"
612612
ToolTip="{Binding Converter={StaticResource DeclarationTypeNameConverter}}">
613613
<Image.Source>
614-
<MultiBinding Converter="{DynamicResource NodeToIcon}">
614+
<MultiBinding Converter="{StaticResource NodeToIcon}">
615615
<MultiBinding.Bindings>
616616
<Binding RelativeSource="{RelativeSource Self}" Path="DataContext"/>
617617
<Binding Path="Declaration" />
@@ -650,7 +650,7 @@
650650
</Grid.ColumnDefinitions>
651651
<Image Grid.Column="0" Style="{DynamicResource ToolbarIconStyle}">
652652
<Image.Source>
653-
<MultiBinding Converter="{DynamicResource NodeToIcon}">
653+
<MultiBinding Converter="{StaticResource NodeToIcon}">
654654
<MultiBinding.Bindings>
655655
<Binding Path="SelectedItem"/>
656656
<Binding Path="SelectedItem.Declaration" />

Rubberduck.Core/UI/CodeMetrics/CodeMetricsControl.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
</Style>
7373
</HierarchicalDataTemplate.ItemContainerStyle>
7474
<HierarchicalDataTemplate.Resources>
75-
<Style x:Key="TreeViewItemStyleModified" TargetType="{x:Type TextBlock}" BasedOn="{DynamicResource TreeViewItemStyle}">
75+
<Style x:Key="TreeViewItemStyleModified" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource TreeViewItemStyle}">
7676
<Setter Property="Text" Value="{Binding NameWithSignature}" />
7777
</Style>
7878
</HierarchicalDataTemplate.Resources>
7979
<StackPanel Orientation="Horizontal">
8080
<Grid>
8181
<Image Style="{DynamicResource ToolbarIconStyle}">
8282
<Image.Source>
83-
<MultiBinding Converter="{DynamicResource NodeToIcon}">
83+
<MultiBinding Converter="{StaticResource NodeToIcon}">
8484
<MultiBinding.Bindings>
8585
<Binding RelativeSource="{RelativeSource Self}" Path="DataContext"/>
8686
<Binding Path="Declaration" />

Rubberduck.Core/UI/Controls/GroupingGrid.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
1818

19-
<Style x:Key="PrettifyRowModified" TargetType="{x:Type DataGridRow}" BasedOn="{DynamicResource PrettifyRow}">
19+
<Style x:Key="PrettifyRowModified" TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource PrettifyRow}">
2020
<EventSetter Event="MouseDoubleClick" Handler="GroupingGridItem_MouseDoubleClick" />
2121
<Setter Property="Height" Value="Auto" />
2222
<Setter Property="MinHeight" Value="26" />
@@ -57,7 +57,7 @@
5757
</ResourceDictionary>
5858
</DataGrid.Resources>
5959
<DataGrid.GroupStyle>
60-
<GroupStyle ContainerStyle="{DynamicResource GroupHeaderStyle}">
60+
<GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}">
6161
<GroupStyle.Panel>
6262
<ItemsPanelTemplate>
6363
<DataGridRowsPresenter/>

Rubberduck.Core/UI/FindSymbol/FindSymbolControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<KeyBinding Command="{Binding GoCommand}" Key="Return" />
4242
</ComboBox.InputBindings>
4343
<ComboBox.Text>
44-
<MultiBinding Converter="{DynamicResource SearchBoxTextConverter}">
44+
<MultiBinding Converter="{StaticResource SearchBoxTextConverter}">
4545
<Binding Path="SearchString" Mode="OneWayToSource" UpdateSourceTrigger="PropertyChanged" />
4646
<Binding Path="SelectedItem.IdentifierName" Mode="OneWay" UpdateSourceTrigger="PropertyChanged" />
4747
</MultiBinding>

Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<Setter Property="Header" Value="{Binding Key, Converter={StaticResource InspectionsUIResourceConverter}}" />
2929
<Setter Property="CommandParameter">
3030
<Setter.Value>
31-
<MultiBinding Converter="{DynamicResource QuickFixCommandParametersToTupleConverter}">
31+
<MultiBinding Converter="{StaticResource QuickFixCommandParametersToTupleConverter}">
3232
<Binding Path="Fix" />
3333
<Binding ElementName="InspectionResultsGrid" Path="SelectedItems" />
3434
<!-- 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. -->
@@ -109,7 +109,7 @@
109109
HeaderTemplate="{DynamicResource MenuItemHeaderDropdownIndicatorTemplate}"
110110
ItemsSource="{Binding QuickFixes}"
111111
Background="Transparent"
112-
ItemContainerStyle="{DynamicResource QuickFixItemStyle}">
112+
ItemContainerStyle="{StaticResource QuickFixItemStyle}">
113113
<MenuItem.Icon>
114114
<Image Source="{DynamicResource FixImage}" />
115115
</MenuItem.Icon>
@@ -244,7 +244,7 @@
244244
</DataGrid.Columns>
245245
<DataGrid.ContextMenu>
246246
<ContextMenu ItemsSource="{Binding PlacementTarget.DataContext.QuickFixes, RelativeSource={RelativeSource Self}}"
247-
ItemContainerStyle="{DynamicResource QuickFixItemStyle}" />
247+
ItemContainerStyle="{StaticResource QuickFixItemStyle}" />
248248
</DataGrid.ContextMenu>
249249
<i:Interaction.Behaviors>
250250
<controls:GroupItemExpandedBehavior ExpandedState="{Binding ExpandedState, Mode=TwoWay}" />

Rubberduck.Core/UI/Refactorings/ExtractInterface/ExtractInterfaceView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
HeadersVisibility="Column"
110110
VerticalScrollBarVisibility="Auto"
111111
HorizontalScrollBarVisibility="Hidden"
112-
ItemContainerStyle="{DynamicResource PrettifyRow}"
112+
ItemContainerStyle="{StaticResource PrettifyRow}"
113113
ColumnHeaderHeight="22"
114114
BorderThickness="0"
115115
Grid.ColumnSpan="3"

Rubberduck.Core/UI/Refactorings/ExtractMethod/ExtractMethodView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
HorizontalScrollBarVisibility="Auto"
168168
HorizontalGridLinesBrush="Transparent"
169169
VerticalGridLinesBrush="Transparent"
170-
ItemContainerStyle="{DynamicResource PrettifyRow}"
170+
ItemContainerStyle="{StaticResource PrettifyRow}"
171171
ColumnHeaderHeight="22"
172172
BorderThickness="0">
173173
<DataGrid.CellStyle>

Rubberduck.Core/UI/Refactorings/RemoveParameters/RemoveParametersView.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<BitmapImage x:Key="RemoveParameterImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/cross-script.png" />
2121
<BitmapImage x:Key="RestoreParameterImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/arrow-return-180-left.png" />
2222

23-
<Style x:Key="PrettyListBoxItemModified" TargetType="{x:Type ListBoxItem}" BasedOn="{DynamicResource PrettyListBoxItem}">
23+
<Style x:Key="PrettyListBoxItemModified" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource PrettyListBoxItem}">
2424
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick" />
2525
</Style>
2626
</ResourceDictionary>
@@ -49,7 +49,7 @@
4949
ItemsSource="{Binding Parameters, UpdateSourceTrigger=PropertyChanged}"
5050
SelectedIndex="0"
5151
Name="ParameterGrid"
52-
ItemContainerStyle="{DynamicResource PrettyListBoxItemModified}"
52+
ItemContainerStyle="{StaticResource PrettyListBoxItemModified}"
5353
AlternationCount="2">
5454
<ListBox.ItemTemplate>
5555
<DataTemplate>

Rubberduck.Core/UI/Refactorings/ReorderParameters/ReorderParametersView.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
SelectedIndex="0"
4646
Name="ParameterGrid"
4747
AllowDrop="True"
48-
ItemContainerStyle="{DynamicResource PrettyListBoxItem}"
48+
ItemContainerStyle="{StaticResource PrettyListBoxItem}"
4949
Drop="ParameterGrid_Drop"
5050
DragEnter="ParameterGrid_DragEnter"
5151
PreviewMouseMove="ParameterGrid_PreviewMouseMove"
@@ -88,7 +88,7 @@
8888
<Style TargetType="Button">
8989
<Setter Property="IsEnabled">
9090
<Setter.Value>
91-
<MultiBinding Converter="{DynamicResource IndexIsNotLast}">
91+
<MultiBinding Converter="{StaticResource IndexIsNotLast}">
9292
<Binding ElementName="ParameterGrid" Path="SelectedIndex" />
9393
<Binding Path="Parameters.Count" />
9494
</MultiBinding>

Rubberduck.Core/UI/RegexAssistant/RegexAssistant.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<HierarchicalDataTemplate
4040
x:Key="RecursiveData"
4141
DataType="TreeViewItem"
42-
ItemContainerStyle="{DynamicResource ShinyTreeView}"
42+
ItemContainerStyle="{StaticResource ShinyTreeView}"
4343
ItemsSource="{Binding Items}">
4444
</HierarchicalDataTemplate>
4545
</ResourceDictionary>
@@ -87,7 +87,7 @@
8787
ScrollViewer.VerticalScrollBarVisibility="Auto"
8888
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
8989
ItemTemplate="{DynamicResource RecursiveData}"
90-
ItemContainerStyle="{DynamicResource ShinyTreeView}"
90+
ItemContainerStyle="{StaticResource ShinyTreeView}"
9191
ItemsSource="{Binding ResultItems}"/>
9292
</GroupBox>
9393
</Grid>

0 commit comments

Comments
 (0)