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.
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.
--
Sincerely,
Alex
The nodes in the tree are actually being created with a type of MenuItemType.
You should update the TargetType of the GlobalNodeLayouts to MenuItemType. This will cause the ItemTemplate to be picked up by the parent and the child nodes.
I also updated the Converter to use reflection to get the Level of the node so that this can be used to determine the current indentation and set the width accordingly.
Please see modified sample.
Let me know if you have any questions.
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
I attached a sample that shows exactly what my problem is as it is much closer to what the code in the real project. It seems that the parent items don't follow the DataTemplate (background was set to red to make this visual).
Thanks for your support!
I am still unsure what the issue is. I added the ItemTemplate to the top level of the tree and increased the length of the Category Names. After theses changes, the top level also wraps when the tree is resized. I also tested binding to the Categories collection so that there were no children and again the behavior was the same. I am attaching the updated sample.
Please provide me with the exact steps to reproduce or a short video along with the exact version / build number of NetAdvantage your are running so that I may be of further assistance.
Your sample does have the issue that I have. I think I haven't explained it properly. The text does wrap for the childeren of the root layout, but not for the parents. In my project there is only one level in the tree at the moment (the upper level) and this doesn't wrap.
Thanks for your help!