Browse Source
StyleResources cannot currently be found in other style resources because the style resource binding is evaluated before the style is attached to the parent. Described in #492.pull/496/head
4 changed files with 53 additions and 0 deletions
@ -0,0 +1,8 @@ |
|||
<Style xmlns="https://github.com/perspex" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|||
<Style.Resources> |
|||
<Color x:Key="Red">Red</Color> |
|||
<Color x:Key="Green">Green</Color> |
|||
<Color x:Key="Blue">Blue</Color> |
|||
</Style.Resources> |
|||
</Style> |
|||
@ -0,0 +1,9 @@ |
|||
<Style xmlns="https://github.com/perspex" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mut="https://github.com/perspex/mutable"> |
|||
<Style.Resources> |
|||
<mut:SolidColorBrush x:Key="RedBrush" Color="{StyleResource Red}"/> |
|||
<mut:SolidColorBrush x:Key="GreenBrush" Color="{StyleResource Green}"/> |
|||
<mut:SolidColorBrush x:Key="BlueBrush" Color="{StyleResource Blue}"/> |
|||
</Style.Resources> |
|||
</Style> |
|||
Loading…
Reference in new issue