I found out that you are't forced to reuse the root elements name: <TreeView><TreeView.Resources><!-- ...
instead you can use a baseclass's name or just the class name where the property was introduced: <TreeView><FrameworkElement.Resources><!-- ... or <PageFunction [..]><Page.Resources><!-- ... or <TreeView><ItemsControl.ItemTemplate><!-- ...
IntelliSense-mouse-hovering always shows it this way.
I think this is an issue with the XAML compiler, the XAML compiler should work correctly when parsing the Resources belonging to generic root element, I would greatly appreciate it if you could feedback this issue at the following connect site alongside with the repro code you pasted above:
I found out that you are't forced to reuse the root elements name: <TreeView><TreeView.Resources><!-- ...
instead you can use a baseclass's name or just the class name where the property was introduced: <TreeView><FrameworkElement.Resources><!-- ... or <PageFunction [..]><Page.Resources><!-- ... or <TreeView><ItemsControl.ItemTemplate><!-- ...
IntelliSense-mouse-hovering always shows it this way.
That's a nice workaround indeed, but I think that usage pattern is actually an implementation detail, and is sometimes confusing, I still suggest feedbacking this issue at connect