Link label to foreground on link selection

i want to set link label to foreground when ever i select or edit link label i have set selectionAdorned to false but then i am not be able to select my link.

please let me know how would i Custom Selection Adornments sop that i can be able to select my link and set the label text to foreground as it does not come to my label text on edit it

image

i have also check GoJS Selection -- Northwoods Software but does not get any solution to set label to foreground when link is selected

I’m assuming that your link label is just a TextBlock that is in the Link panel, yes?

If so, then everything that is in that visual tree is drawn at the same time. One cannot interleave the drawing of some elements of a Part such as a Link with the drawing of another Part such as an Adornment.

So when the link is selected, do you really need a separate selection Adornment?

If so, you could duplicate the label in your Adornment. You might as well give that label a background so that it definitely occludes everything behind it.

But if you don’t need a separate Adornment, you could change the color of the link path to show selection. That way if the TextBlock label was in front of the link path Shape, it would remain that way when the link was selected.

hey walter can i use zorder in label to set it upto link when the link is selected because when i am using duplicate the label in Adornment then i am not able to click on link label and edit it.

I suppose you could have the Link’s Adornment in a special Layer that is behind whatever Layer that the Link is in. However then the Link’s path and any other link labels such as arrowheads would be behind the Adornment too.