Strange behavior with ux:Ref


I found a strange behavior when using ux:Ref, at least different behavior.

I have this style :

  <SolidColor ux:Key="AssertiveBg"    ux:Global="AssertiveBg"  Color="#f76c6c" />
  <SolidColor ux:Key="DarkBg"         ux:Global="DarkBg"       Color="#3e4666" />

and this Class drawing two rectangles :

<StackPanel ux:Class="Rect">
    <Rectangle Fill="{Resource Bg}" Height="100" Width="100" Margin="1">
    <Rectangle Fill="{Resource Bg2}" Height="100" Width="100" Margin="1">

And use it like that :

<App Theme="Basic" Background="#eeeeeeff">
                <SolidColor ux:Key="Bg" ux:Ref="AssertiveBg" />
                <SolidColor ux:Key="Bg2" Color="#ffff00" />

Now try to replace the ux:Ref="AssertiveBg" by Color="##f76c6c" directly : the result is very different.

Thanks !

Now here when it begins to be really strange :

Replace <SolidColor ux:Key="Bg" ux:Ref="AssertiveBg" />

with <SolidColor ux:Key="randomString" ux:Ref="AssertiveBg" />

And it still “works”.