How to change color of a Button?

Hi,

I tried to overlay a button and a rectangle to change the color. But a small portion of the (wrong) color was visible at the bottom.

Is there an easy way to change the color of a button? Am I just too stupid to find it in the documentation?

Or, alternatively, what is the code to have a rectangle which can be clicked and connect that event to the javascript (like for a button)?

Sorry, I promise to ask less questions in the future :slight_smile:

Use SolidColor inside the button.

<Button>
    <SolidColor Color="#FF0000" />
</Button>

You might have to set the SolidColor Layer property to Background

You could try removing the button entirely and making the rectangle the โ€œbuttonโ€ instead.

<Rectangle Fill="#COLOR">
    <Clicked>

  </Clicked>
</Rectangle>