Hi Tal,
Layers are transparent sheets that can be added to the model
and the objects are added to it. Layers allow to categorically arrange a set of
nodes onto the diagram. Layers are used to group nodes in collections and then show
or hide layers with all nodes. One node can be assigned to many layers. Node
will be visible, if all layers are visible; even if one layer is hidden, node
will not be visible. For your requirement to show semi-transparent
background for active layers. Currently, we don’t have any option to achieve it
in layers. You can achieve this in Groups. But you can’t able to add a single
node to multiple groups. We have prepared a simple sample for the Groups and
set its background as semi-transparent. Please find the sample in below attachment.
|
public class CustomGrp : Group
{
protected override void
PrepareGraphics(Graphics gfx)
{
// Based on your condition you can use this code, we have used
visible property
if (this.Visible)
{
System.Drawing.Brush brush = new SolidBrush(System.Drawing.Color.SkyBlue);
gfx.FillRectangle(brush, this.BoundingRect);
}
base.PrepareGraphics(gfx);
}
}
|
Regards,
Karkuvel Rajan S
Attachment:
DiagramSample_44fb5cdd.zip