Ho to change the color of links between the nodes

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)

        GoLinkData mld = (GoLinkData)myDiagram.SelectedLink.Data as GoLinkData;
        if (mld != null)
                var entry = myDiagram.SelectedLink;
                mld.Color = Colors.Blue;
                LinkColors = Colors.Blue;
            catch (Exception)
            { }



What was your question/problem?

I do notice that you are trying to data-bind the Path’s Figure to the Data.Color, which is likely to cause an error.

Hmm, and its Stroke to the Data.Caption, whatever that is.

This is exactly i want.i hope this makes it more clear to you .
Need to change the colors of the links.Pls suggest how to do it.

First, I think you should fix any data-binding errors that you might have. As I just pointed out, some of them look very suspicious.

Second, did you implement the GoLinkData.Color property setter to call RaisePropertyChanged?

Third, you should make changes to the model or its data inside a transaction by calling StartTransaction beforehand and CommitTransaction afterwards.