Rotating Buttons

I seem to have a problem when I rotate buttons…
I have a button, which I rotated 45 degrees as shown here:

however, when I click it, the area, which is “sensitive” to clicking is not the whole rotated rectangle:

To me it seems like the right border is the border of the rectangle if it would be a 0 degrees:

Is this a misconfiguration on my side or a bug?
Thank you

This probably is a bug. There are a few quirks with Rotation. Not sure what the best work around is for this problem. Maybe add a 2nd button or try placing an unrotated button inside a rotated Grid or Canvas. Those layout controls may handle rotation better.

Hey Roger! Looks really great!

Not a fix but, if you make the button transparent (opacity = 0) you will no longer see the button area when you press it. You wouldn’t need to worry about the button fitting perfectly. Maybe you would prefer that?

Hi Jeff,
I am not worried about the visual but way more functionality (but need to apply it as it looks better, you are right ;-)). The active area is only the one you see when you click and does not cover the whole room.
Initially I had regular (rotation 0) buttons with different sizes to cover the room but this would be nicer to do it with the rotating button as I would have to maintain only 1.
@bill: I added a Canvas with an unrotated button in and rotated the canvas with the same result. I can go back to the original solution (using several buttons to cover the area) until there is a fix

Hi… I am facing similar problem… not with buttons but with rectangles… I am trying to do something similar to Roger and I am laying the floor of a 3D floor-plan with ‘light on’ rectangles when a light is on… but of course we need to rotate some of the rectangles to make them appear in perspective…

The bug seems to be that the TOP and LEFT coordinates of the rectangle (or button) seem to respond to the Rotation, but the RIGHT and BOTTOM coordinates do not respect the rotation and ignore it.

Is there any planned fix to this?


All controls should behave the same when it comes to rotation (Buttons, Rectangles, etc). Be sure to set the Height & Width on the control. Problems tend to arise when those properties use the default NaN values. Also check your Margins, HorizontalAlignment, & VerticalAlignment or Canvas.Top, Left, Right, Bottom if you are using a Canvas.