Class Container
Containers are used to automatically measure and arrange the size and position of the child elements in a predefined manner.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.JavaScript.DataVisualization.Models.Diagram
Assembly: Syncfusion.EJ.dll
Syntax
public class Container : EJTagHelper
Constructors
Container()
Declaration
public Container()
Properties
Orientation
Gets or sets the orientation of the container. Applicable, if the group is a container.
Declaration
[JsonProperty("orientation")]
public string Orientation { get; set; }
Property Value
Type | Description |
---|---|
System.String | "vertical" |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node1 = new Node();
Node1.Name = "node2";
Node1.Width = 100;
Node1.Height = 100;
Model.Nodes.Add(Node1);
Node Node2 = new Node();
Node2.Name = "node2";
Node2.Width = 100;
Node2.Height = 100;
Model.Nodes.Add(Node2);
Group Group = new Group();
Group.Name = "Group";
Group.Children.Add("Node1");
Group.Children.Add("Node2");
Group.Container = new Container() { Type = ContainerType.Stack, Orientation = "horizontal" };
Model.Nodes.Add(Group);
Type
Gets or sets the type of the container. Applicable if the group is a container.
Declaration
[JsonProperty("type")]
[JsonConverter(typeof(StringEnumConverter))]
public ContainerType Type { get; set; }
Property Value
Type | Description |
---|---|
ContainerType | ContainerType.Canvas |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node1 = new Node();
Node1.Name = "node2";
Node1.Width = 100;
Node1.Height = 100;
Model.Nodes.Add(Node1);
Node Node2 = new Node();
Node2.Name = "node2";
Node2.Width = 100;
Node2.Height = 100;
Model.Nodes.Add(Node2);
Group Group = new Group();
Group.Name = "Group";
Group.Children.Add("node1");
Group.Children.Add("node2");
Group.Container = new Container() { Type = ContainerType.Stack, Orientation = "horizontal" };
Model.Nodes.Add(Group);