<DataTemplate>
<TextBlock Text="{Binding Data.ChapterName}" />
</DataTemplate>
</ig:NodeLayout.ItemTemplate>
</ig:NodeLayout>
</ig:XamDataTree.GlobalNodeLayouts>
</ig:XamDataTree>
code behind:
private void XamContextMenu_Opening(object sender, OpeningEventArgs e)
{
//this gives error
List<XamDataTreeNode> elements = e.GetClickedElements<XamDataTreeNode>();
}
Note: This works fine with the XamTree (List<XamTreeItem> elements = e.GetClickedElements<XamTreeItem>();)
Thanks in advance.
Hi,
Any thoughts, its urgent for me.
Thanks
Hello,
I have been looking into your question and the reason for this behavior is that in XamDataTree the visual element that represents the items is of type XamDataTreeNodeControl instead of the XamTreeItem ( used by xamTree ).
So the following code gave me the needed element:
private void xamContextMenu1_Opened(object sender, Infragistics.Controls.Menus.OpenedEventArgs e)
var elements = e.GetClickedElements<XamDataTreeNodeControl>();
Please in case of future concerns do not hesitate to contact us again.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
I am just checking your progress on the issue.
If you require any further assistance please do not hesitate to ask.
Infragistics
yes, the issue is resolved now.
Thanks.
Sheuly