Slider and radio button styling in wpf

我们两清 提交于 2019-12-21 21:37:21

问题


I'm trying to style some wpf user controls to make them look the same i have in my web application. I found some really great example for every control i need except for sliders and radio buttons.
Here is how they should look like:
Slider:

Radio Button:

I know i should create some ControlTemplate but i don't really know where to start...
If you can provide a complete example it would be perfect, but i guess that even some good deep advise would fit my needs. Thank you 1000!


回答1:


I have style sample here. It renders this:




回答2:


I would start with Control Styles and Templates on MSDN pages. There are examples for most controls which give a good overview of how the control template works. Also you can extract/download the original control template and try to make your changes to it. Download default control templates

P.S. Actually the slider example on the first link resembles the one you describe.




回答3:


Try using Expression Blend.

  • Learn Expression

and specifically this video: Creating ControlTemplates.

Expression Blend is something like a XAML design application - you can size, colour, adjust fill and stroke etc on all the elements in a control. It takes a little while to get used to, but you will be able to design controls with a graphical UI and Expression will provide you with the appropriate XAML to use in your project.



来源:https://stackoverflow.com/questions/8847459/slider-and-radio-button-styling-in-wpf

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