Class BackgroundImage
Defines whether the BackgroundImage is stretchable and align the background image anywhere over the diagram area. ///
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 BackgroundImage : EJTagHelper
Constructors
BackgroundImage()
Declaration
public BackgroundImage()
Properties
Alignment
Gets or sets the image alignment of background image
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("alignment")]
public ImageAlignment Alignment { get; set; }
Property Value
Type | Description |
---|---|
ImageAlignment | ImageAlignment.XMidYMid |
Examples
DiagramProperties Model = new DiagramProperties();
BackgroundImage BackgroundImage = new BackgroundImage();
BackgroundImage.Alignment = ImageAlignment.XMidYMid;
model.BackgroundImage = BackgroundImage;
Scale
Gets or sets scale constraints of the background image
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("scale")]
public ScaleConstraints Scale { get; set; }
Property Value
Type | Description |
---|---|
ScaleConstraints | ScaleConstraints.Meet |
Examples
DiagramProperties Model = new DiagramProperties();
BackgroundImage BackgroundImage = new BackgroundImage();
BackgroundImage.Scale = ScaleConstraints.Meet;
model.BackgroundImage = BackgroundImage;
Source
Gets or sets source of the background image
Declaration
[JsonProperty("source")]
public string Source { get; set; }
Property Value
Type | Description |
---|---|
System.String | null |
Examples
DiagramProperties Model = new DiagramProperties();
BackgroundImage BackgroundImage = new BackgroundImage();
BackgroundImage.Source = "../../Images/AirLineReservation/plane-image.png";
model.BackgroundImage = BackgroundImage;