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
2805
use different ItemTemplate in nodelayout
posted

As you can see in my attached image, to make part of text editable (some nodes don't need), I can use grid in ItemTemplate. Since at the same level, the nodes have different layouts, I want to create different ItemTemplates. But how can I bind different nodelayout with different ItemTemplate? Currently I have a bool field to separate them.

Thanks for help.

Parents
No Data
Reply
  • 30945
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into the functionality that you are trying to achieve and if you have a Boolean property that is determining the type of the node and whether should use different template, I can suggest defining the two appearances in the same ItemTemplate and using a DataTrigger in the DataTemplate.Triggers to change the view based on the bool property. I have created a sample application for you, that shows how you can implement this approach.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir, MCPD

    Developer Support Supervisor - XAML

    Infragistics

    www.infragistics.com/support

    DifferentTempaltesOnOneLayout.zip
Children