删除手风琴项目箭头和默认背景颜色?
我正在使用 WPFToolkit 中的手风琴,并且当我尝试在 Expression Blend4 中编辑它时也想删除手风琴项目箭头,但它不允许我在那里。因此,如果有人可以帮助提供示例模板,我如何隐藏箭头和默认的蓝色背景。
提前致谢。
I am using Accordion from WPFToolkit and wanted to remove the accordion item arrow also when i am trying to edit it in Expression Blend4 then it does not allow me over there. So if anybody can help with a sample template how can i hide the arrow and the default blue background.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需编辑控件样式即可。这个示例来自 Silverlight 工具包,但我敢打赌它的原理都是相同的。
1) 删除箭头
我有一个名为 toolkitStyles.xaml 的文件,其中定义了以下样式。
在这种样式中(您必须寻找它),您将找到类似于此的代码
将其注释掉,然后搜索 x:Name(它可能不是 WPFToolkit 中的“箭头”)并删除任何内容引用它以便您可以构建它。
2) 删除蓝色背景
找到像这样的样式
。它可能接近样式的底部。
(请注意,在我的中,我已经设置了背景=“透明”,你的背景要么是蓝色,要么是模板绑定,无论哪种方式,只需将其设置为透明或任何你想要的颜色)
You can just edit the control style. This example is from Silverlight toolkit, but I'd bet its all the same principals.
1) Remove Arrow
I have a file called toolkitStyles.xaml in which I have the following style defined.
Inside this style (you will have to hunt for it), you'll find code similar to this
Comment it out, and then to a search on the x:Name (it might not be "arrow" in the WPFToolkit) and remove anything that references it so that you can build it.
2) Remove blue background
Find the style like
Find the line like this. It is probably near the bottom of the style.
(Please note in mine I have already set Background="Transparent", yours will either be blue or a templatebinding, either way just set it to transparent or whatever color you want it)