How do I change the stroke color of a rectangle?

Hi all,

I’m learning Fuse and have the following working to change the rectangle background color, but I’d also like to change the stroke color, but I’m unsure what syntax targets that element:

<Rectangle ux:Name="playerRect" Color="White" Height="50" >
    <Stroke Width="4" Color="#3579e6" />
    <MyPlayerTextInput ux:Name="txt{Property this.playerName}" Value="{Property this.playerName}" />

    <WhileFocusWithin>
	    <Change playerRect.Color="#78acff" Duration="0.2" />
    </WhileFocusWithin>
</Rectangle>

Hi Jason,

just give the Stroke a ux:Name and target it from another Change, like so:

<Rectangle ux:Name="playerRect" Color="White" Height="50" >
    <Stroke ux:Name="playerRectStroke" Width="4" Color="#3579e6" />
    <MyPlayerTextInput ux:Name="txt{Property this.playerName}" Value="{Property this.playerName}" />

    <WhileFocusWithin>
        <Change playerRect.Color="#78acff" Duration="0.2" />
        <Change playerRectStroke.Color="#f00" Duration="0.2" />
    </WhileFocusWithin>
</Rectangle>

Thank you, so obvious! :slight_smile: