menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ImageElement - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ImageElement

    Represents the class that defines a basic image elements.

    Inheritance
    System.Object
    CommonElement
    DiagramElement
    ImageElement
    Inherited Members
    CommonElement.ActualSize
    CommonElement.Bounds
    CommonElement.CornerRadius
    CommonElement.DesiredSize
    CommonElement.Flip
    CommonElement.FlipMode
    CommonElement.Height
    CommonElement.HorizontalAlignment
    CommonElement.ID
    CommonElement.IsDirt
    CommonElement.Margin
    CommonElement.MaxHeight
    CommonElement.MaxWidth
    CommonElement.MinHeight
    CommonElement.MinWidth
    CommonElement.OffsetX
    CommonElement.OffsetY
    CommonElement.OuterBounds
    CommonElement.ParentID
    CommonElement.Pivot
    CommonElement.RelativeMode
    CommonElement.RotationAngle
    CommonElement.Shadow
    CommonElement.Style
    CommonElement.VerticalAlignment
    CommonElement.Visible
    CommonElement.Width
    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

    Overrides
    DiagramElement.Clone()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved