# How do I change the stroke color of a rectangle?

**URL:** <https://forums.fusetools.com/t/how-do-i-change-the-stroke-color-of-a-rectangle/2372>\
**Category:** How-to Discussions\
**Created:** [August 16, 2017, 4:51pm UTC](https://forums.fusetools.com/t/how-do-i-change-the-stroke-color-of-a-rectangle/2372 "2017-08-16T16:51:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Scott](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@Jason\_Scott](https://forums.fusetools.com/u/Jason_Scott)\
**Post date:** [August 16, 2017, 4:51pm UTC](https://forums.fusetools.com/t/how-do-i-change-the-stroke-color-of-a-rectangle/2372/1 "2017-08-16T16:51:54Z")

</div>

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>
```

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [August 16, 2017, 4:56pm UTC](https://forums.fusetools.com/t/how-do-i-change-the-stroke-color-of-a-rectangle/2372/2 "2017-08-16T16:56:03Z")

</div>

Hi Jason,

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

```auto
<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>

```

---

<div class="post-metadata">

**Author:** ![Jason\_Scott](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@Jason\_Scott](https://forums.fusetools.com/u/Jason_Scott)\
**Post date:** [August 16, 2017, 5:25pm UTC](https://forums.fusetools.com/t/how-do-i-change-the-stroke-color-of-a-rectangle/2372/3 "2017-08-16T17:25:14Z")

</div>

Thank you, so obvious! 🙂
