Browse Source

Merge pull request #1168 from wieslawsoltes/UseDynamicResource

Use DynamicResource instead of StyleResource
Steven Kirk 8 years ago
parent
commit
e98e70f34b

+ 2 - 2
samples/ControlCatalog/Pages/ToolTipPage.xaml

@@ -10,7 +10,7 @@
               HorizontalAlignment="Center">
               HorizontalAlignment="Center">
             <Border Grid.Column="0"
             <Border Grid.Column="0"
                     Grid.Row="1"
                     Grid.Row="1"
-                    Background="{StyleResource ThemeAccentBrush}"
+                    Background="{DynamicResource ThemeAccentBrush}"
                     Margin="5"
                     Margin="5"
                     Padding="50"
                     Padding="50"
                     ToolTip.Tip="This is a ToolTip">
                     ToolTip.Tip="This is a ToolTip">
@@ -24,7 +24,7 @@
             <Border Name="Border"
             <Border Name="Border"
                     Grid.Column="1"
                     Grid.Column="1"
                     Grid.Row="1"
                     Grid.Row="1"
-                    Background="{StyleResource ThemeAccentBrush}"
+                    Background="{DynamicResource ThemeAccentBrush}"
                     Margin="5"
                     Margin="5"
                     Padding="50"
                     Padding="50"
                     ToolTip.Placement="Bottom">
                     ToolTip.Placement="Bottom">

+ 7 - 7
src/Avalonia.Themes.Default/RepeatButton.xaml

@@ -1,13 +1,13 @@
 <Styles xmlns="https://github.com/avaloniaui">
 <Styles xmlns="https://github.com/avaloniaui">
     <Style Selector="RepeatButton">
     <Style Selector="RepeatButton">
         <Setter Property="Background"
         <Setter Property="Background"
-                Value="{StyleResource ThemeControlMidBrush}" />
+                Value="{DynamicResource ThemeControlMidBrush}" />
         <Setter Property="BorderBrush"
         <Setter Property="BorderBrush"
-                Value="{StyleResource ThemeBorderLightBrush}" />
+                Value="{DynamicResource ThemeBorderLightBrush}" />
         <Setter Property="BorderThickness"
         <Setter Property="BorderThickness"
-                Value="{StyleResource ThemeBorderThickness}" />
+                Value="{DynamicResource ThemeBorderThickness}" />
         <Setter Property="Foreground"
         <Setter Property="Foreground"
-                Value="{StyleResource ThemeForegroundBrush}" />
+                Value="{DynamicResource ThemeForegroundBrush}" />
         <Setter Property="HorizontalContentAlignment"
         <Setter Property="HorizontalContentAlignment"
                 Value="Center" />
                 Value="Center" />
         <Setter Property="VerticalContentAlignment"
         <Setter Property="VerticalContentAlignment"
@@ -31,14 +31,14 @@
     </Style>
     </Style>
     <Style Selector="RepeatButton:pointerover /template/ ContentPresenter">
     <Style Selector="RepeatButton:pointerover /template/ ContentPresenter">
         <Setter Property="BorderBrush"
         <Setter Property="BorderBrush"
-                Value="{StyleResource ThemeBorderMidBrush}" />
+                Value="{DynamicResource ThemeBorderMidBrush}" />
     </Style>
     </Style>
     <Style Selector="RepeatButton:pressed  /template/ ContentPresenter">
     <Style Selector="RepeatButton:pressed  /template/ ContentPresenter">
         <Setter Property="Background"
         <Setter Property="Background"
-                Value="{StyleResource ThemeControlDarkBrush}" />
+                Value="{DynamicResource ThemeControlDarkBrush}" />
     </Style>
     </Style>
     <Style Selector="RepeatButton:disabled">
     <Style Selector="RepeatButton:disabled">
         <Setter Property="Opacity"
         <Setter Property="Opacity"
-                Value="{StyleResource ThemeDisabledOpacity}" />
+                Value="{DynamicResource ThemeDisabledOpacity}" />
     </Style>
     </Style>
 </Styles>
 </Styles>