This is .xaml File
<ig:XamNetworkNode x:Name="xnn" Background="AliceBlue" NodeControlAttachedEvent="Xnn_NodeControlAttachedEvent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Persons}" ZoomLevel="2" LineEndCap="SolidArrow" LineCapSize="10" SelectionType="Single" Grid.Row="3" FontSize="20" SelectedNodesCollectionChanged="xnn_SelectedNodesCollectionChanged" > <ig:XamNetworkNode.GlobalNodeLayouts> <ig:NetworkNodeNodeLayout x:Name="xmnode" TargetTypeName="Person" NodeStyle="{StaticResource MyNodeStyle}" ConnectionsMemberPath="Connections" ConnectionTargetMemberPath="Target" ConnectionWeightMemberPath="Weight" ToolTipMemberPath="ToolTip" DisplayMemberPath="Name" /> </ig:XamNetworkNode.GlobalNodeLayouts>
</ig:XamNetworkNode>
Iin xaml.cs
private void xnn_SelectedNodesCollectionChanged(object sender, Infragistics.Controls.Maps.NetworkNodeSelectionEventArgs e) { for (int i = 0; i < xnn.SelectedNodes.Count; i++) { this.tb_DisaplayNode.Text = ((Person)xnn.SelectedNodes[i].Data).Name; } }
This event is not raising while I am selecting any node but It is raising in some other event,
So not able to find the current selected node
Hello Rajni,
I followed the steps you suggested and was unable to reproduce the behavior you're describing. I created a sample XamNetworkNode and enabled selection and handled the selection changed event. The event fired every time I selected a different node.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, then the change in behavior is due to differences in your environment from mine and these differences can be anything from operating system version to the specific version of the Infragistics DLL versions used. My test was performed using version 18.2.20182.186 in Infragistics for WPF 2018 Volume 2. Please provide more details about your machine and version of the assemblies that you are referencing so that I can modify the environment that I am testing in to match yours.
If the project does show the product feature working correctly, then more information will be needed to reproduce the issue in a sample that can be used for debugging. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing. This can be done by either be done by making the sample that I provided more like your application or by isolating the behavior from your application by removing dependencies on any third parties or databases.
Please let me know if I can provide any further assistance.
XamNetworkNode.zip
Thankyou so much Mike.I got the exact problem now.Why this event is not working fine.This is happening due to style.When I removed style , it started working but I am not getting why this happened