Class ImageElement
Represents the class that defines a basic image elements.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class ImageElement : DiagramElement
Constructors
ImageElement()
Initializes a new instance of the ImageElement class.
Declaration
public ImageElement()
ImageElement(ImageElement)
Creates a new instance of the ImageElement from the given ImageElement.
Declaration
public ImageElement(ImageElement src)
Parameters
Type | Name | Description |
---|---|---|
ImageElement | src | basic image element. |
Properties
ImageAlign
Gets or sets the alignment of the image within the bounds specified.
Declaration
public ImageAlignment ImageAlign { get; set; }
Property Value
Type | Description |
---|---|
ImageAlignment | The default value will be None |
Examples
Node node5 = new Node()
{
Shape = new ImageShape()
{
Type = NodeShapes.Image, ImageAlign = ImageAlignment.None, Scale = DiagramScale.None,
Source = " https://www.syncfusion.com/content/images/nuget/sync_logo_icon.png"
},
};
nodes.Add(node5);
ImageScale
Gets or sets how the image will be scaled to fit within the bounds specified by the image scale property
Declaration
public DiagramScale ImageScale { get; set; }
Property Value
Type | Description |
---|---|
DiagramScale | The default value will be None |
Examples
Node node5 = new Node()
{
Shape = new ImageShape()
{
Type = NodeShapes.Image, ImageAlign = ImageAlignment.None, Scale = DiagramScale.None,
Source = " https://www.syncfusion.com/content/images/nuget/sync_logo_icon.png"
},
};
nodes.Add(node5);
ImageSize
Gets or sets the actual size of the image element to be rendered.
Declaration
public DiagramSize ImageSize { get; set; }
Property Value
Type |
---|
DiagramSize |
Source
Gets or sets the source of the image element.
Declaration
public string Source { get; set; }
Property Value
Type |
---|
System.String |
Examples
Node node5 = new Node()
{
Shape = new ImageShape()
{
Type = NodeShapes.Image,
Source = " https://www.syncfusion.com/content/images/nuget/sync_logo_icon.png"
},
};
nodes.Add(node5);
Methods
Clone()
Creates a new image element that is a copy of the current image element
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | ImageElement |