开发者

How do you change the color of the WPF treeview arrow?

How would I go about changing the color of the arr开发者_如何学编程ows that show up next to a treeviewitem in the wpf treeview? The arrows indicate whether the item is expanded or collapsed, I believe they are plus / minus signs with the windows xp theme.


This is embedded into the template, you could only change the color by copying the default Aero-Style for the control and changing the hard-coded value, or by drilling down the visual tree on-load to change it that way.

To get the default style & tenmplate see MSDN (Default WPF Themes link).


If you have MS Blend, you can achieve this by creating your own template.

Here is an example: http://geekswithblogs.net/tkokke/archive/2009/06/29/styling-a-treeview-in-silverlight-and-blend-3.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜