开发者

scale silverlight checkbox checkmark box to a lower size

开发者 https://www.devze.com 2023-03-13 11:59 出处:网络
I need a silverli开发者_如何学运维ght checkbox with the box that holds the checkmark much smaller(10px x 10 px) than the default size.

I need a silverli开发者_如何学运维ght checkbox with the box that holds the checkmark much smaller(10px x 10 px) than the default size. is this possible?


Use a ScaleTransform.

You can see from the code on the MSDN page that you can use it on any UI element. So in your case you'd want something like this:

<CheckBox ...>
  <CheckBox.RenderTransform>
    <ScaleTransform ScaleX="0.8" ScaleY="0.8" />
  </CheckBox.RenderTransform>
</CheckBox>

You'll have to play with the scale values to get the numbers right, though if you know the current size you could do some maths to get the scale needed to reduce it to 10x10 pixels.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号