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
1320
Wrapping text in a XamDataTree
posted

Hello, 

I'm currently using a XamDataTree and I would like the following functionality:

When there isn't enough space for the text in the XamDataTree I would like the text in the labels to wrap (multiple lines). 

Is this possible and how can I achieve this? I've attached an example project.

WpfApplication2.zip
Parents
  • 14517
    Offline posted

    Hello,

     

    You can use the ItemTemplate property of the NodeLayout to a DataTemplate which contains a TextBlock with a set width and the TextWrapping property set to Wrap:

     

    <ig:NodeLayout Key="ChildLayout" TargetTypeName="Product"  >

       <ig:NodeLayout.ItemTemplate>

          <DataTemplate>    

            <TextBlock Text="{Binding Data.ProductName}" TextWrapping="Wrap" Width="90"/>  

          </DataTemplate>

      </ig:NodeLayout.ItemTemplate>

    </ig:NodeLayout>

     

    Let me know if you have any questions.

     

    Sincerely,

    Valerie

    Developer Support Supervisor - XAML

    Infragistics

    www.infragistics.com/support

Reply Children
No Data