Hi,
I'm trying to find a way to select a node with right-click before opening contextual menu.
Is this possible ?
Thanks for your help
Hello Prasanti,
Thank you for your post. I have been looking into it and I can suggest you see the sample in the Samples Browser under xamDataTree / Display / Node Layout section where it is shown how to define node layouts. Under xamDataTree / Display / NodeLines section you can see how to add images to the nodes.
Hopes this helps you.
Hi Stefan,
I have tried a sample on XamDataTree which is binded to my collection having two entities, namely Categories and Products. I tried to include a datatemplate in nodelayout to display an image followed by textblock for a node . But I failed to do it. I have declared an interface called Node, with Name and children(Collection of Node) as its members and my Category and Product classes are inherited from the Node interface. In Category class, I have set Children to Collection of Products and In Product I have set children to null. And I have set the name property to their respective names.
The Problem I am facing is:
I could not see any Product List under each Category. All I could display is a list of categories.
My DataTemplate is
<ig:NodeLayout.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Data.Text}">
</DataTemplate>
</ig:NodeLayout.ItemTemplate>
Kindly help me in this issue.
Thankyou,
Prasanti
Thanks for reopening this issue.
Daniel,
FYI: if you can't open a project in visual studio, you can still examine the source code using a text editor, such as notepad, or my personal favorite editor-of-last-resort, notepad++
Hello Stefan,
Thank you for your post. I have been looking into it and I created a sample project with the same functionality...
...unfortunately I cannot open the project because it is incompatible with my version of Visual Studio (2010).Anyway, I found a solution meanwhile which solves my problem.
Daniel
Hello Daniel,
Thank you for your post. I have been looking into it and I created a sample project with the same functionality Nikolay achieved, but in WPF. Basically instead of using VisualTreeHelper’s FindElementsInHostCoordinates method, which is not available in WPF, I used the Infragistics Utilities class and the GetAncestorFromType method to get the clicked node. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.