Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
XamDataTree and DataTemplateSelector

Hey there,

I'm trying to set up the XamDataTree with templates that will switch based on the underlying type. Is using a DataTemplateSelector supported? I read a very old post that indicated maybe not, but can someone confirm? If it is supported, can you provide an example? Thanks!

  • 33370
    Offline posted

    Hello Tracie,

    Unfortunately, the XamDataTree does not support a DataTemplateSelector for any of its template properties at this time.

    I am under the impression that you are likely looking for this to work with an ItemTemplate for a NodeLayout though, and if this is the case, you can still kind of do this by using DataTriggers to target pieces of the template and modify their Visibility based on the underlying data. For example, I am attaching a sample project to demonstrate a different piece of a template being hidden or shown based on an underlying data item property.

    I hope this helps. Please let me know if you have any other questions or concerns on this matter.

Reply Children
No Data