I want to change the colors of the links between any 2 nodes on selecting the link and right click opens a context menu which contains the list of colors.
If i click on red then the link should change to red color if i click blue color it should change to green color.
this is my link template.
this is the c# contextmenu click function:-
Here linkcolor is a color type property
private void miblue_Click(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
LinkColors = Colors.Blue;
if (myDiagram.SelectedLink == null)
return;
GoLinkData mld = (GoLinkData)myDiagram.SelectedLink.Data as GoLinkData;
if (mld != null)
{
try
{
var entry = myDiagram.SelectedLink;
mld.Color = Colors.Blue;
LinkColors = Colors.Blue;
}
catch (Exception)
{ }
}
}