开发者

How to apply a custom style/template to a treeviewItem in xaml

开发者 https://www.devze.com 2023-03-23 03:51 出处:网络
So I have editted the TreeViewItem template, (so that I could get rid of the checkbox). I was just wondering how I can apply this template 开发者_StackOverflowto my treeview...The Treeview is databou

So I have editted the TreeViewItem template, (so that I could get rid of the checkbox).

I was just wondering how I can apply this template 开发者_StackOverflowto my treeview...The Treeview is databound.

is it something like:

<TreeView>
<TreeView.ItemTemplate>
....
...

?

Thanks!


Use the ItemContainerStyle of the TreeView. Or apply it implicitly by having it defined in the resources with only the TargetType set (this could be superior as the ItemContainerStyle may only affect the root items).

0

精彩评论

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