Change the color of the link


I am evaluating Gosilverlight component. I have taken LinkDemo example from the source code provided and I want to change the color of the link selected when a new link is selected from the combo box:ArrowHeadChanged
here is the code of this event: ArrowHeadChanged
// Handles any change in ArrowBox by changing SelectedLink.Data.ArrowheadShape
private void ArrowheadChanged(object sender, EventArgs e) {
if (myDiagram.SelectedLink == null) return; MyLinkData mld = (MyLinkData)myDiagram.SelectedLink.Data as MyLinkData;
if (mld != null) {
try { var entry = (KeyValuePair<String, String>)ShapeBox.SelectedItem; mld.ArrowheadShape = entry.Value;

} catch (Exception) {}

Now here I want to change the color of the link selected,so i have used Color property of mld and setting to Green. But still i could not see the link 's color is changed....!
Can anyone help me out by saying where is the wrong and how can I change the color of any node/link when selected in this example?
Thanks & Regards

As you can see in the definition of the Color property of MyLinkData, it does not support property change notification.

If you change the implementation of that property to be like the other properties that check for a change in value and call RaisePropertyChanged, data-binding will be able to keep the element targets up-to-date with the data sources with respect to the Color property.

Thanks for the reply. I tried the following in the MyLinkDataClass
private String strColor;
public String Color
get { return strColor; }
if (strColor != value)
String oldColor = strColor;
strColor = value;
RaisePropertyChanged("Color", oldColor, value);
But still the color of a selected Link node is not getting changed.

Sorry, I forgot to mention that you need to remove Mode=OneTime from the Binding.

Yes…its working now. Thanks a ton.