Make ScaleTransform start from Center instead of Top-Left Corner

后端 未结 2 1142
长情又很酷
长情又很酷 2021-02-06 21:54

I have the following Style for a Button which is supposed to grow to 1.5 times the size when the mouse hovers it. The problem is that Button grows from the Top-Left corner inste

2条回答
  •  难免孤独
    2021-02-06 22:39

    ScaleTransform.CenterX and ScaleTransform.CenterY are not values between [0, 1], rather they should be absolute pixel values.

    
    

提交回复
热议问题