This question is related to some multi select functionality I just added to the treeview.
The questions is if it is possible to define a style with a given TargetType at multiple levels?
I have derived TreeView and TreeViewItem, and defined a style for the TreeViewItem which I apply programmatically to the TreeView when the multi select option is enabled.
The style is defined in a separate file (resource.xaml), and what I do is I load the resource, find the style by key, then apply it to the treeview like this
MyTreeView.Resources[typeof(MyTreeViewItem)] = loaded style
View Complete Post