How to style the thumb of wpf slider?

只谈情不闲聊 提交于 2019-12-11 02:55:03

问题


I read about style here:

http://msdn.microsoft.com/en-us/library/cc278073(v=VS.95).aspx

I created a UserControl with slider and UserControl.Resources section. I paste the thumb style but some tag are not recognized like vsm:VisualStateManager (I'm using VS2010) why ?


回答1:


That is the documentation for Silverlight. You probably want the documentation for WPF:

  • Slider Styles and Templates

Edit:

Just to be clear, if you are using Silverlight, you should use Silverlight templates and styles; if you are using WPF, you should use WPF templates and styles.

In any case, the VisualStateManager is a full-fledged part of both Silverlight4 and WPF4, so if you see a template with the "vsm:" namespace, the simplest option is to just remove the prefix where-ever you see it.



来源:https://stackoverflow.com/questions/4777850/how-to-style-the-thumb-of-wpf-slider

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