如何设置 wpf 滑块的拇指样式? [英] How to style the thumb of wpf slider?

查看:34
本文介绍了如何设置 wpf 滑块的拇指样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里阅读了有关样式的信息:

I read about style here:

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

我创建了一个带有滑块和 UserControl.Resources 部分的 UserControl.我粘贴了拇指样式,但无法识别某些标记,例如 vsm:VisualStateManager(我使用的是 VS2010)为什么?

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 ?

推荐答案

那是 Silverlight 的文档.您可能需要 WPF 的文档:

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

需要明确的是,如果您使用的是 Silverlight,则应该使用 Silverlight 模板和样式;如果您使用 WPF,则应使用 WPF 模板和样式.

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.

无论如何,VisualStateManager 是 Silverlight4 和 WPF4 的完整部分,因此如果您看到带有vsm:"命名空间的模板,最简单的选择是删除前缀 - 无论您在哪里看到它.

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.

这篇关于如何设置 wpf 滑块的拇指样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆