You can write an internal method to change the pen color based on your own criteria. e.g. You can create a parital class for AggregrationColor class (a language based on ClassDiagram) and provide an internal method.
public partial class AggregationConnector
{
internal void SetConnectorColor ( System.Drawing.KnownColor color)
{
StyleSet classStyleSet = base.StyleSet;
DslDiagrams::PenSettings linePen = new DslDiagrams::PenSettings();
linePen.Color = global::System.Drawing.Color.FromKnownColor(color);
classStyleSet.OverridePen(DslDiagrams::DiagramPens.ConnectionLineDecorator, linePen);
classStyleSet.OverridePen(DslDiagrams::DiagramPens.ConnectionLine, linePen);
}
}
In your menu handler, you can find the right connect and call the SetConnectorColor method. When the diagram is being repainted, it will display the color you specified.
HTH
Microsoft Visual Studio Team.
Thanks this solved the problem
Only 1 problem left - how to create an editable Domain Type (see other message)