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.
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
Hello, Valerie!
I used your WidthConverter to wrap text in the attached simple example, and faced with the following problem:
If I add a new element to the collection when the text is not transferred to the next line,the new node is marked as active, and automatically scrolled into the visible area.
However, if the text in any of the nodes is wrapped, the node is added it does not appear in the visible area.
Help me please.
--
Alex