开发者

scale silverlight checkbox checkmark box to a lower 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜