Hello,
I have a few queries regarding the Silverlight XamNetworkNode Control where I couldn't find online information:
1) Is there a way to add a labels to a Connection (or use a template) , or show a tooltip when a connection has mouse over?
2) Is it possible to vary the NodeDistance per node? I would like some groups of nodes clustered together closely, and the links between these clusters to be wider. At the minute my clusters are crashing into each other, and its difficult to visually separate them.
3) Is it possible to group nodes together, and therefore allow moving all nodes when any are moved as a group?
Thanks,
Jon
HI,
for issue 1:
Here are some code snippets that allow you to adjust the connections between nodes:
<Style x:Key="lstyle" TargetType="{x:Type Path}">
<Setter Property="ToolTip" Value="hello"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="StrokeThickness" Value="14"/>
<Setter Property="StrokeDashCap" Value="Round"/>
<Setter Property="Stroke" Value="Red"/>
</Style>
<ig:XamNetworkNode x:Name="xnn"
ItemsSource="{Binding Nodes}"
Grid.RowSpan="2"
LineStyle="{StaticResource lstyle}"
LineCapSize="15"
LineStartCap="Square"
LineEndCap="Arrow"
Loaded="xnn_Loaded" >
Sincerely,
Matt
Developer Support Engineer
Hello Matt,
Please ignore my last couple of posts, I now have a Static Tooltip.
However I need the tooltip to be dynamic.
I am using the example from here as a basis for my solution:
http://help.infragistics.com/Help/NetAdvantage/WPF/2013.1/CLR4.0/html/xamNetworkNode_Getting_Started_with_xamNetworkNode.html
I have altered the ConnectionModel and added a label property.
I have then attempted to bind to this property using:
<Setter Property="ToolTipService.ToolTip" Value="{Binding Path=Label}" />
In the style template example you send me earlier, but with no success.
Is Dynamic binding to a label possible?
Is there a way to do this code behind?
Thanks, Jon
Thanks for the example, I now have this working, and also thanks for opening the New Feature Requests.
I created feature requests for your other two issues
1) varying distance between nodes
2) grouping nodes together.
I will create a private case for these new feature requests.
Sincerely, Mat
Here is the sample.
It makes use of the XamNetworkNode's DefineConnectionCallbback Property, to set the Tooltip of the connections.
http://help.infragistics.com/NetAdvantage/WPF/2013.1/CLR4.0/?page=InfragisticsWPF4.Controls.Maps.XamNetworkNode.v13.1~Infragistics.Controls.Maps.XamNetworkNode_members.html
I am attaching a sample application that will allow you to set a tooltip on the connection between nodes using a property form class bound to each node.
Please review my sample
matt
I have asked the developers to look into this issue.