Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Using HierarchicalDataTemplate's DataType to handle Generic XML Data (via XmlDataProvider)

$
0
0

Goal: create UI to display generic XML in a treeView using HierarchicalDataTemplate's dataType parameter keying off different type of XmlNodes (such as XmlElement and XmlAttribute)

sample:

<HierarchicalDataTemplateDataType="{x:Type system_xml:XmlElement}">
   ...</HierarchicalDataTemplate><HierarchicalDataTemplateDataType="{x:Type system_xml:XmlAttribute}">
   ...</HierarchicalDataTemplate>

This does not seem to work. I'm aware you can set DataType to name of specific XML tags, but I'd like to handle any XML.

Thanks



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>