Failed to change Background color

Tried this with 0.9.1 and failed with an error E8001: None of the global resources with alias ‘#3E3E3E’ can be used here.

<Panel ux:Name="testing_panel" Background="#222222">
    <WhilePressed>
        <Change testing_panel.Background="#3E3E3E" />
    </WhilePressed>

    ...

</Panel>

Background is a kind of “shortcut” property that doesn’t support animation this way (we have an issue to look into doing this). You need to use the non-shortcut approach:

<Panel>
  <SolidColor ux:Name="back_color" Background="#222222">
  <WhilePressed>
    <Change back_color.Background="#3E3E3E" />
  </WhilePressed>

Thanks. Good to know. It’s better than adding a Rectangle inside the Panel and trying to change the Rectangle fill :slight_smile:

Umm… no luck.

E8001: back_color.Background is not a valid property path

Oops, sorry, I messed up the example, it should refer to Color not background:

<Panel>
  <SolidColor ux:Name="back_color" Color="#222222"/>
  <WhilePressed>
     <Change back_color.Color="#3E3E3E" />
  </WhilePressed>

Cool. All good.