wpf toolkit rating size

偶尔善良 提交于 2019-12-09 03:51:26

问题


I'm using a rating control (from wpf toolkit) in my application. Is there any way I can scale this control? The rating stars are too big for my application..

I tried setting the height or width but that just cuts the stars but doens't resize them:

Rating ratingControl = new Rating();
ratingControl .ItemsSource = ratingItems;
ratingControl.Width = 50;
ratingControl.Height = 10;
// --> this doesn't change the size of the stars



Greets Daan


回答1:


i dont know the rating control, but if you wanna scale something in wpf you can simply use ScaleTransform

  <Rating>
      <Rating.LayoutTransform>
            <ScaleTransform ScaleX="0.8" ScaleY="0.8"></ScaleTransform>
        </Rating.LayoutTransform>
   </Rating>


来源:https://stackoverflow.com/questions/9312934/wpf-toolkit-rating-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!