Hi
I have a XamlDataTree that I drag upon from a different XamDataTree. I can drop items bellow the last item and the new item is added. But when the window is full, there is no more place under the last item, and so, I can't drop an additional item (or it is very difficult since there is very little space which should be exactly located and there is no indication the mouse is hovering over it).
I also tried adding ScrollViewer.CanContentScroll=true and ScrollViewer.VerticalScrollBarVisibility=true hoping that will help but it didn't (also no scrollbar appeared).
So my question if it's possile to create some padding from the bottom of the control where new items can be dropped even if the control is full or perhaps there is a different solution.
Thanks
I am using version 16.1
Hello Pinto,
I have been investigating into the behavior you are seeing, and I’d like to get an idea of the page layout that you have your XamDataTree elements placed in, as there should not be a sense of “full” in the XamDataTree, as the data tree can scroll and will scroll with its built-in drag and drop operations by default. This is assuming that you haven’t created your own drag and drop for the tree, but here is a link to the default drag and drop documentation just in case: https://www.infragistics.com/help/wpf/xamdatatree-xamdatatree-drag-and-drop.
With the above said, I am wondering if you have your XamDataTree placed within a ScrollViewer or a StackPanel element, as this will disable the scrollbars of the tree if you do not provide a fixed Height for the tree. This is expected, as those elements measure their children with an infinite height. Can you please provide more information on the layout of your page and whether or not your tree is within one of these elements?
Please let me know if you have any other questions or concerns on this matter.
Yes, the XamDataTree IS within a StackPanel. But it also has a Height property specified.
<ig:XamDataTree Height="620" x:Name=".." ItemSource=".." IsDraggable=".." IsDropTarget=".." Margin="10,4,10,0" NodeDragDrop="..">
I have put together a sample project where I have two XamDataTrees within a pair of StackPanels where dragging and dropping between them is enabled. I have also set a Height property so that if the nodes go outside the bounds of the tree, the scrollbar will appear, and at the moment it is appearing correctly.
I am attaching this sample project here. Please test it on your machine, as the way that it acts may indicate the issues you are seeing further. If it does not show the behavior you are seeing, this indicates a possible issue in the code of your application, and it would be helpful if you can please modify this sample and send it back or provide an isolated one of your own.
XamDataTreeDragBetweenCase.zip
I have successfully run your sample. I notice two issues that are problematic:
1. In your sample project when hovering on the desired location, a light blue line with leading small triangle appears which assists the user to identify when the correct drop location is reached. In my project this line does not appear which makes it difficult for the user to understand when correct loction is reached.
2. Problem 1 is compounded by the fact that when the window is full there is only a very thin place where the mouse should hover in order to drop the item (this may also be the case when the window isn't full, but it still feels more dificult when it is)
Thank you for your update on this matter.
I am curious as to why the identifying drag and drop line would not be showing up on your end. Are you re-templating the XamDataTreeNodeControl object or potentially implementing your own custom drag and drop in this case?
Regarding the secondary issue, I would like you to take a look at the modifications I have made to the sample project that uses a Style for XamDataTreeNodeControl to add a bottom margin to the last node in the tree, as this should help to resolve the thin area at the bottom of the tree for the last node by giving more space at the bottom of the nodes panel.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.
0815.XamDataTreeDragBetweenCase.zip