Skip to content

Commit add576a

Browse files
author
Frederik Terstappen
committed
Disabled color binding changed to relative ancestor frameworkelements foreground color
1 parent 366c95e commit add576a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Hyperlink.xaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</Trigger>
1212
<Trigger Property="IsEnabled" Value="false">
1313
<Setter Property="Foreground"
14-
Value="{DynamicResource PrimaryHueLightBrush}" />
14+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
1515
</Trigger>
1616
<Trigger Property="IsEnabled" Value="true">
1717
<Setter Property="Cursor" Value="Hand" />
@@ -29,7 +29,7 @@
2929
</Trigger>
3030
<Trigger Property="IsEnabled" Value="false">
3131
<Setter Property="Foreground"
32-
Value="{DynamicResource PrimaryHueLightBrush}" />
32+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
3333
</Trigger>
3434
<Trigger Property="IsEnabled" Value="true">
3535
<Setter Property="Cursor" Value="Hand" />
@@ -47,7 +47,7 @@
4747
</Trigger>
4848
<Trigger Property="IsEnabled" Value="false">
4949
<Setter Property="Foreground"
50-
Value="{DynamicResource PrimaryHueLightBrush}" />
50+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
5151
</Trigger>
5252
<Trigger Property="IsEnabled" Value="true">
5353
<Setter Property="Cursor" Value="Hand" />
@@ -65,7 +65,7 @@
6565
</Trigger>
6666
<Trigger Property="IsEnabled" Value="false">
6767
<Setter Property="Foreground"
68-
Value="{DynamicResource PrimaryHueLightBrush}" />
68+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
6969
</Trigger>
7070
<Trigger Property="IsEnabled" Value="true">
7171
<Setter Property="Cursor" Value="Hand" />
@@ -83,7 +83,7 @@
8383
</Trigger>
8484
<Trigger Property="IsEnabled" Value="false">
8585
<Setter Property="Foreground"
86-
Value="{DynamicResource PrimaryHueLightBrush}" />
86+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
8787
</Trigger>
8888
<Trigger Property="IsEnabled" Value="true">
8989
<Setter Property="Cursor" Value="Hand" />
@@ -101,7 +101,7 @@
101101
</Trigger>
102102
<Trigger Property="IsEnabled" Value="false">
103103
<Setter Property="Foreground"
104-
Value="{DynamicResource PrimaryHueLightBrush}" />
104+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
105105
</Trigger>
106106
<Trigger Property="IsEnabled" Value="true">
107107
<Setter Property="Cursor" Value="Hand" />
@@ -119,7 +119,7 @@
119119
</Trigger>
120120
<Trigger Property="IsEnabled" Value="false">
121121
<Setter Property="Foreground"
122-
Value="{DynamicResource PrimaryHueLightBrush}" />
122+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
123123
</Trigger>
124124
<Trigger Property="IsEnabled" Value="true">
125125
<Setter Property="Cursor" Value="Hand" />
@@ -137,7 +137,7 @@
137137
</Trigger>
138138
<Trigger Property="IsEnabled" Value="false">
139139
<Setter Property="Foreground"
140-
Value="{DynamicResource PrimaryHueLightBrush}" />
140+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
141141
</Trigger>
142142
<Trigger Property="IsEnabled" Value="true">
143143
<Setter Property="Cursor" Value="Hand" />
@@ -155,7 +155,7 @@
155155
</Trigger>
156156
<Trigger Property="IsEnabled" Value="false">
157157
<Setter Property="Foreground"
158-
Value="{DynamicResource PrimaryHueLightBrush}" />
158+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
159159
</Trigger>
160160
<Trigger Property="IsEnabled" Value="true">
161161
<Setter Property="Cursor" Value="Hand" />
@@ -173,7 +173,7 @@
173173
</Trigger>
174174
<Trigger Property="IsEnabled" Value="false">
175175
<Setter Property="Foreground"
176-
Value="{DynamicResource PrimaryHueLightBrush}" />
176+
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
177177
</Trigger>
178178
<Trigger Property="IsEnabled" Value="true">
179179
<Setter Property="Cursor" Value="Hand" />

0 commit comments

Comments
 (0)