menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDiagram - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfDiagram

    Represents a diagram.

    Inheritance
    System.Object
    SfDiagram
    Namespace: Syncfusion.SfDiagram.XForms
    Assembly: Syncfusion.SfDiagram.XForms.dll
    Syntax
    public class SfDiagram : View, IParentThemeElement, IThemeElement

    Constructors

    SfDiagram()

    Initializes a new instance of the SfDiagram class.

    Declaration
    public SfDiagram()

    SfDiagram(DiagramStyleSettings)

    Initializes a new instance of the SfDiagram class.

    Declaration
    public SfDiagram(DiagramStyleSettings defaultStyleProperties)
    Parameters
    Type Name Description
    DiagramStyleSettings defaultStyleProperties

    DiagramStyleSettings.

    Fields

    ConnectorsProperty

    Represents the bindable property of ConnectorsProperty.

    Declaration
    public static readonly BindableProperty ConnectorsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    ContextMenuSettingsProperty

    Represents the bindable property of ContextMenuSettingsProperty.

    Declaration
    public static readonly BindableProperty ContextMenuSettingsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    DataSourceSettingsProperty

    Represents the bindable property of DataSourceSettingsProperty.

    Declaration
    public static readonly BindableProperty DataSourceSettingsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    DrawingModeProperty

    Represents the bindable property of DrawingModeProperty.

    Declaration
    public static readonly BindableProperty DrawingModeProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableAutoScrollProperty

    Represents the bindable property of EnableAutoScrollProperty.

    Declaration
    public static readonly BindableProperty EnableAutoScrollProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableDragProperty

    Represents the bindable property of EnableDragProperty.

    Declaration
    public static readonly BindableProperty EnableDragProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableResizeProperty

    Represents the bindable property of EnableResizeProperty.

    Declaration
    public static readonly BindableProperty EnableResizeProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableRotationProperty

    Represents the bindable property of EnableZoomAndPanProperty.

    Declaration
    public static readonly BindableProperty EnableRotationProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableSelectorsProperty

    Represents the bindable property of EnableSelectorsProperty.

    Declaration
    public static readonly BindableProperty EnableSelectorsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableTextEditingProperty

    Represents the bindable property of EnableTextEditingProperty.

    Declaration
    public static readonly BindableProperty EnableTextEditingProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableVirtualizationProperty

    Represents the bindable property of EnableVirtualizationProperty.

    Declaration
    public static readonly BindableProperty EnableVirtualizationProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableZoomAndPanProperty

    Represents the bindable property of EnableZoomAndPanProperty.

    Declaration
    public static readonly BindableProperty EnableZoomAndPanProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    FrameProperty

    Represents the bindable property of SourcePoint.

    Declaration
    public static readonly BindableProperty FrameProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    IsReadOnlyProperty

    Represents the bindable property of IsReadOnlyProperty.

    Declaration
    public static readonly BindableProperty IsReadOnlyProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    LayoutManagerProperty

    Represents the bindable property of LayoutManagerProperty.

    Declaration
    public static readonly BindableProperty LayoutManagerProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MaximumZoomFactorProperty

    Represents the bindable property of MaximumZoomFactorProperty.

    Declaration
    public static readonly BindableProperty MaximumZoomFactorProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MinimumZoomFactorProperty

    Represents the bindable property of MaximumZoomFactorProperty.

    Declaration
    public static readonly BindableProperty MinimumZoomFactorProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    NodesProperty

    Represents the bindable property of NodesProperty.

    Declaration
    public static readonly BindableProperty NodesProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    NodeTemplateProperty

    Represents the bindable property of NodeTemplateProperty.

    Declaration
    public static readonly BindableProperty NodeTemplateProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    OverviewPanelProperty

    Represents the bindable property of OverviewPanelProperty.

    Declaration
    public static readonly BindableProperty OverviewPanelProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    PageSettingsProperty

    Represents the bindable property of PageSettingsProperty.

    Declaration
    public static readonly BindableProperty PageSettingsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    ScrollSettingsProperty

    Represents the bindable property of ScrollSettingsProperty.

    Declaration
    public static readonly BindableProperty ScrollSettingsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    StencilProperty

    Represents the bindable property of StencilProperty.

    Declaration
    public static readonly BindableProperty StencilProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    UserHandlesProperty

    Represents the bindable property of UserHandlesProperty.

    Declaration
    public static readonly BindableProperty UserHandlesProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    Properties

    Connectors

    Gets or sets the connector collection from diagram.

    Declaration
    public ConnectorCollection Connectors { get; set; }
    Property Value
    Type Description
    ConnectorCollection

    sfdiagram Connector collection.

    ContextMenuSettings

    Gets or sets the Context Menu Settings.

    Declaration
    public ContextMenuSettings ContextMenuSettings { get; set; }
    Property Value
    Type Description
    ContextMenuSettings

    The Context Menu Settings.

    DataSourceSettings

    Gets or sets the DataSource settings for automatic layouting of diagram like Organizational chart.

    Declaration
    public DataSourceSettings DataSourceSettings { get; set; }
    Property Value
    Type
    DataSourceSettings

    DrawingMode

    Gets or sets drawingMode.

    Declaration
    public DrawingMode DrawingMode { get; set; }
    Property Value
    Type
    DrawingMode

    EnableAutoScroll

    Gets or sets a value indicating whether gets or sets whether autoscroll needs to enabled or not.

    Declaration
    public bool EnableAutoScroll { get; set; }
    Property Value
    Type
    System.Boolean

    EnableDrag

    Gets or sets a value indicating whether this Syncfusion.SfDiagram.Android.SfDiagram is dragging enabled.

    Declaration
    public bool EnableDrag { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if is dragging enabled; otherwise, false.

    EnableResize

    Gets or sets a value indicating whether this Syncfusion.SfDiagram.Android.SfDiagram is resizing enabled.

    Declaration
    public bool EnableResize { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if is resizing enabled; otherwise, false.

    EnableRotation

    Gets or sets a value indicating whether this Syncfusion.SfDiagram.Android.SfDiagram is rotation enabled.

    Declaration
    public bool EnableRotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if is rotation enabled; otherwise, false.

    EnableSelectors

    Gets or sets a value indicating whether this Syncfusion.SfDiagram.iOS.SfDiagram enable selectors.

    Declaration
    public bool EnableSelectors { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if enable selectors; otherwise, false.

    EnableTextEditing

    Gets or sets a value indicating whether this Syncfusion.SfDiagram.Android.SfDiagram is text editing enabled.

    Declaration
    public bool EnableTextEditing { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if is text editing enabled; otherwise, false.

    EnableVirtualization

    Gets or sets a value indicating whether gets or sets whether the virtualization needs to be enabled or not.

    Declaration
    public bool EnableVirtualization { get; set; }
    Property Value
    Type
    System.Boolean

    EnableZoomAndPan

    Gets or sets a value indicating whether zooming and panning operations are enabled or not.

    Declaration
    public bool EnableZoomAndPan { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if is enable zoom and pan; otherwise, false.

    Frame

    Gets or sets Frame.

    Declaration
    public Rectangle Frame { get; set; }
    Property Value
    Type
    Xamarin.Forms.Rectangle

    IsReadOnly

    Gets or sets a value indicating whether isReadOnly.

    Declaration
    public bool IsReadOnly { get; set; }
    Property Value
    Type
    System.Boolean

    LayoutManager

    Gets or sets the LayoutManager of the SfDiagram.

    Declaration
    public LayoutManager LayoutManager { get; set; }
    Property Value
    Type Description
    LayoutManager

    Layout the sfdiagram node and connectors.

    MaximumZoomFactor

    Gets or sets the MaximumZoomFactor.

    Declaration
    public float MaximumZoomFactor { get; set; }
    Property Value
    Type Description
    System.Single

    Diagram Maximum Zoom.

    MinimumZoomFactor

    Gets or sets the MinimumZoomFactor.

    Declaration
    public float MinimumZoomFactor { get; set; }
    Property Value
    Type Description
    System.Single

    Diagram Minimum Zoom.

    Nodes

    Gets or sets the Nodecollection of the SfDiagram.

    Declaration
    public NodeCollection Nodes { get; set; }
    Property Value
    Type Description
    NodeCollection

    Sfdaigram Node collection.

    NodeTemplate

    Gets or sets the node template.

    Declaration
    public DataTemplate NodeTemplate { get; set; }
    Property Value
    Type Description
    Xamarin.Forms.DataTemplate

    Assign the template for node.

    OverviewPanel

    Gets or sets overviewPanel.

    Declaration
    public OverviewPanel OverviewPanel { get; set; }
    Property Value
    Type
    OverviewPanel

    PageSettings

    Gets or sets the page settings.

    Declaration
    public PageSettings PageSettings { get; set; }
    Property Value
    Type Description
    PageSettings

    The page settings.

    ScrollSettings

    Gets or sets the scroll settings.

    Declaration
    public ScrollSettings ScrollSettings { get; set; }
    Property Value
    Type Description
    ScrollSettings

    The scroll settings.

    SelectedItems

    Gets selectedItems.

    Declaration
    public IList<DiagramBaseItem> SelectedItems { get; }
    Property Value
    Type
    System.Collections.Generic.IList<DiagramBaseItem>

    Stencil

    Gets or sets the stencil.

    Declaration
    public Stencil Stencil { get; set; }
    Property Value
    Type Description
    Stencil

    Stencil for Sfdiagram.

    UserHandles

    Gets or sets userHandles.

    Declaration
    public UserHandleCollection UserHandles { get; set; }
    Property Value
    Type
    UserHandleCollection

    ZoomFactor

    Gets or Sets the ZoomFactor.

    Declaration
    public float ZoomFactor { get; set; }
    Property Value
    Type
    System.Single

    Methods

    add_BeginNodeLayout(BeginNodeLayoutEventHandler)

    Declaration
    public void add_BeginNodeLayout(BeginNodeLayoutEventHandler value)
    Parameters
    Type Name Description
    BeginNodeLayoutEventHandler value

    add_BeginNodeRender(BeginNodeRenderEventHandler)

    Declaration
    public void add_BeginNodeRender(BeginNodeRenderEventHandler value)
    Parameters
    Type Name Description
    BeginNodeRenderEventHandler value

    add_ConnectorClicked(ConnectorClickEventHandler)

    Declaration
    public void add_ConnectorClicked(ConnectorClickEventHandler value)
    Parameters
    Type Name Description
    ConnectorClickEventHandler value

    add_DiagramClicked(DiagramClickEventHandler)

    Declaration
    public void add_DiagramClicked(DiagramClickEventHandler value)
    Parameters
    Type Name Description
    DiagramClickEventHandler value

    add_DiagramObjectDeleted(DiagramObjectDeletedEventHandler)

    Declaration
    public void add_DiagramObjectDeleted(DiagramObjectDeletedEventHandler value)
    Parameters
    Type Name Description
    DiagramObjectDeletedEventHandler value

    add_DiagramObjectDropped(DiagramObjectDroppedEventHandler)

    Declaration
    public void add_DiagramObjectDropped(DiagramObjectDroppedEventHandler value)
    Parameters
    Type Name Description
    DiagramObjectDroppedEventHandler value

    add_DragEnd(DragEndEventHandler)

    Declaration
    public void add_DragEnd(DragEndEventHandler value)
    Parameters
    Type Name Description
    DragEndEventHandler value

    add_ItemAdded(ItemAddedEventHandler)

    Declaration
    public void add_ItemAdded(ItemAddedEventHandler value)
    Parameters
    Type Name Description
    ItemAddedEventHandler value

    add_ItemLongPressed(ItemLongPressedEventHandler)

    Declaration
    public void add_ItemLongPressed(ItemLongPressedEventHandler value)
    Parameters
    Type Name Description
    ItemLongPressedEventHandler value

    add_Loaded(DiagramLoadedEventHandler)

    Declaration
    public void add_Loaded(DiagramLoadedEventHandler value)
    Parameters
    Type Name Description
    DiagramLoadedEventHandler value

    add_NodeClicked(NodeClickEventHandler)

    Declaration
    public void add_NodeClicked(NodeClickEventHandler value)
    Parameters
    Type Name Description
    NodeClickEventHandler value

    add_OnTextEdit(OnTextEditEventHandler)

    Declaration
    public void add_OnTextEdit(OnTextEditEventHandler value)
    Parameters
    Type Name Description
    OnTextEditEventHandler value

    add_ResizeEnd(ResizeEndEventHandler)

    Declaration
    public void add_ResizeEnd(ResizeEndEventHandler value)
    Parameters
    Type Name Description
    ResizeEndEventHandler value

    add_RotateEnd(RotateEndEventHandler)

    Declaration
    public void add_RotateEnd(RotateEndEventHandler value)
    Parameters
    Type Name Description
    RotateEndEventHandler value

    add_SymbolGroupExpandCollapse(SymbolGroupExpandCollapseEventHandler)

    Declaration
    public void add_SymbolGroupExpandCollapse(SymbolGroupExpandCollapseEventHandler value)
    Parameters
    Type Name Description
    SymbolGroupExpandCollapseEventHandler value

    add_TextChanged(TextChangedEventHandler)

    Declaration
    public void add_TextChanged(TextChangedEventHandler value)
    Parameters
    Type Name Description
    TextChangedEventHandler value

    add_UserHandleClicked(UserHandleClickedEventHandler)

    Declaration
    public void add_UserHandleClicked(UserHandleClickedEventHandler value)
    Parameters
    Type Name Description
    UserHandleClickedEventHandler value

    AddConnector(Connector)

    Adds a specified Connector to the diagram view.

    Declaration
    public void AddConnector(Connector con)
    Parameters
    Type Name Description
    Connector con

    Connector.

    AddNode(Node)

    Add the Node to the diagram view.

    Declaration
    public void AddNode(Node node)
    Parameters
    Type Name Description
    Node node

    Add the node to diagram.

    BringForward()

    Bring Forward if the selected instance is intersects with othe instance.

    Declaration
    public void BringForward()

    BringToFront()

    Bring Front the selected instance.

    Declaration
    public void BringToFront()

    BringToView(DiagramBaseItem)

    Brings the specified object to visisble region.

    Declaration
    public void BringToView(DiagramBaseItem obj)
    Parameters
    Type Name Description
    DiagramBaseItem obj

    DiagramBaseItem object.

    Clear()

    Clears the Node collection and Connector collection from the Diagram.

    Declaration
    public void Clear()

    ClearSelection()

    ClearSelection.

    Declaration
    public void ClearSelection()

    Copy()

    Copies the latest selected item in SfDiagram.

    Declaration
    public void Copy()

    Cut()

    Cuts the latest selected item in SfDiagram.

    Declaration
    public void Cut()

    Delete()

    Removes the latest selected item in SfDiagram.

    Declaration
    public void Delete()

    LoadFromJson(String)

    Loads the JSON saved file into Diagram.

    Declaration
    public void LoadFromJson(string jsonString)
    Parameters
    Type Name Description
    System.String jsonString

    JsonString.

    Paste()

    Paste the copied item to the SfDiagram.

    Declaration
    public void Paste()

    Redo()

    Redo the latest selected item in SfDiagram.

    Declaration
    public void Redo()

    remove_BeginNodeLayout(BeginNodeLayoutEventHandler)

    Declaration
    public void remove_BeginNodeLayout(BeginNodeLayoutEventHandler value)
    Parameters
    Type Name Description
    BeginNodeLayoutEventHandler value

    remove_BeginNodeRender(BeginNodeRenderEventHandler)

    Declaration
    public void remove_BeginNodeRender(BeginNodeRenderEventHandler value)
    Parameters
    Type Name Description
    BeginNodeRenderEventHandler value

    remove_ConnectorClicked(ConnectorClickEventHandler)

    Declaration
    public void remove_ConnectorClicked(ConnectorClickEventHandler value)
    Parameters
    Type Name Description
    ConnectorClickEventHandler value

    remove_DiagramClicked(DiagramClickEventHandler)

    Declaration
    public void remove_DiagramClicked(DiagramClickEventHandler value)
    Parameters
    Type Name Description
    DiagramClickEventHandler value

    remove_DiagramObjectDeleted(DiagramObjectDeletedEventHandler)

    Declaration
    public void remove_DiagramObjectDeleted(DiagramObjectDeletedEventHandler value)
    Parameters
    Type Name Description
    DiagramObjectDeletedEventHandler value

    remove_DiagramObjectDropped(DiagramObjectDroppedEventHandler)

    Declaration
    public void remove_DiagramObjectDropped(DiagramObjectDroppedEventHandler value)
    Parameters
    Type Name Description
    DiagramObjectDroppedEventHandler value

    remove_DragEnd(DragEndEventHandler)

    Declaration
    public void remove_DragEnd(DragEndEventHandler value)
    Parameters
    Type Name Description
    DragEndEventHandler value

    remove_ItemAdded(ItemAddedEventHandler)

    Declaration
    public void remove_ItemAdded(ItemAddedEventHandler value)
    Parameters
    Type Name Description
    ItemAddedEventHandler value

    remove_ItemLongPressed(ItemLongPressedEventHandler)

    Declaration
    public void remove_ItemLongPressed(ItemLongPressedEventHandler value)
    Parameters
    Type Name Description
    ItemLongPressedEventHandler value

    remove_Loaded(DiagramLoadedEventHandler)

    Declaration
    public void remove_Loaded(DiagramLoadedEventHandler value)
    Parameters
    Type Name Description
    DiagramLoadedEventHandler value

    remove_NodeClicked(NodeClickEventHandler)

    Declaration
    public void remove_NodeClicked(NodeClickEventHandler value)
    Parameters
    Type Name Description
    NodeClickEventHandler value

    remove_OnTextEdit(OnTextEditEventHandler)

    Declaration
    public void remove_OnTextEdit(OnTextEditEventHandler value)
    Parameters
    Type Name Description
    OnTextEditEventHandler value

    remove_ResizeEnd(ResizeEndEventHandler)

    Declaration
    public void remove_ResizeEnd(ResizeEndEventHandler value)
    Parameters
    Type Name Description
    ResizeEndEventHandler value

    remove_RotateEnd(RotateEndEventHandler)

    Declaration
    public void remove_RotateEnd(RotateEndEventHandler value)
    Parameters
    Type Name Description
    RotateEndEventHandler value

    remove_SymbolGroupExpandCollapse(SymbolGroupExpandCollapseEventHandler)

    Declaration
    public void remove_SymbolGroupExpandCollapse(SymbolGroupExpandCollapseEventHandler value)
    Parameters
    Type Name Description
    SymbolGroupExpandCollapseEventHandler value

    remove_TextChanged(TextChangedEventHandler)

    Declaration
    public void remove_TextChanged(TextChangedEventHandler value)
    Parameters
    Type Name Description
    TextChangedEventHandler value

    remove_UserHandleClicked(UserHandleClickedEventHandler)

    Declaration
    public void remove_UserHandleClicked(UserHandleClickedEventHandler value)
    Parameters
    Type Name Description
    UserHandleClickedEventHandler value

    RemoveConnector(Connector)

    Removes the specified Connector from the diagram view.

    Declaration
    public void RemoveConnector(Connector con)
    Parameters
    Type Name Description
    Connector con

    Connector.

    RemoveNode(Node)

    Removes the node.

    Declaration
    public void RemoveNode(Node node)
    Parameters
    Type Name Description
    Node node

    Remove the Node from diagram.

    RemoveNode(Node, Boolean)

    RemoveNode.

    Declaration
    public void RemoveNode(Node node, bool removeAllChildrens)
    Parameters
    Type Name Description
    Node node

    node.

    System.Boolean removeAllChildrens

    RemoveAllChildrens.

    SaveAsImage()

    Save the SfDiagram into image. It’s using default format “.png” File Name - it’s generated automatically by using the Current Date and Time.

    Declaration
    public void SaveAsImage()

    SaveAsImage(ImageFormat)

    Save the sfdiagram as image in specific format.

    Declaration
    public void SaveAsImage(ImageFormat imageformat)
    Parameters
    Type Name Description
    ImageFormat imageformat

    Save image in provided format.

    SaveAsImage(ImageFormat, Int32)

    Save the sfdiagram as image in specific format.

    Declaration
    public void SaveAsImage(ImageFormat imageFormat, int padding)
    Parameters
    Type Name Description
    ImageFormat imageFormat

    Save image in provided format.

    System.Int32 padding

    Represents the padding for the diagram in the image.

    SaveAsImage(ImageFormat, Int32, Int32, Int32, Int32)

    Save the sfdiagram as image in specific format.

    Declaration
    public void SaveAsImage(ImageFormat imageFormat, int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    ImageFormat imageFormat

    Save image in provided format.

    System.Int32 left

    left value of padding.

    System.Int32 top

    top value of padding.

    System.Int32 right

    right value of padding.

    System.Int32 bottom

    bottom value of padding.

    SaveAsImage(Int32)

    Save the SfDiagram into image. It’s using default format “.png” File Name - it’s generated automatically by using the Current Date and Time.

    Declaration
    public void SaveAsImage(int padding)
    Parameters
    Type Name Description
    System.Int32 padding

    Represents the padding for the diagram in the image.

    SaveAsImage(Int32, Int32, Int32, Int32)

    Save the sfdiagram as image in specific format.

    Declaration
    public void SaveAsImage(int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    System.Int32 left

    left value of padding.

    System.Int32 top

    top value of padding.

    System.Int32 right

    right value of padding.

    System.Int32 bottom

    bottom value of padding.

    SaveAsImage(Stream)

    Save the sfdiagram as Stream.

    Declaration
    public void SaveAsImage(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream.

    Remarks

    It only works in Android and iOS platform and not supported in UWP

    SaveAsImage(Stream, ImageFormat)

    Save the sfdiagram as Stream with Specific ImageFormat.

    Declaration
    public void SaveAsImage(Stream stream, ImageFormat imageforamt)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream.

    ImageFormat imageforamt

    Save image in provided format.

    Remarks

    It only works in Android and iOS platform and not supported in UWP

    SaveAsImage(Stream, ImageFormat, Int32)

    Save the sfdiagram as Stream with Specific ImageFormat.

    Declaration
    public void SaveAsImage(Stream stream, ImageFormat imageFormat, int padding)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream for image.

    ImageFormat imageFormat

    Save image in provided format.

    System.Int32 padding

    Represents the padding for the diagram in the image.

    Remarks

    It only works in Android and iOS platform and not supported in UWP

    SaveAsImage(Stream, ImageFormat, Int32, Int32, Int32, Int32)

    Save the sfdiagram as Stream with Specific ImageFormat.

    Declaration
    public void SaveAsImage(Stream stream, ImageFormat imageFormat, int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream for image.

    ImageFormat imageFormat

    Save image in provided format.

    System.Int32 left

    left value of padding.

    System.Int32 top

    top value of padding.

    System.Int32 right

    right value of padding.

    System.Int32 bottom

    bottom value of padding.

    Remarks

    It only works in Android and iOS platform and not supported in UWP

    SaveAsImage(Stream, Int32)

    Save the sfdiagram as Stream.

    Declaration
    public void SaveAsImage(Stream stream, int padding)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream.

    System.Int32 padding

    Represents the padding for the diagram in the image.

    Remarks

    It only works in Android and iOS platform and not supported in UWP

    SaveAsImage(Stream, Int32, Int32, Int32, Int32)

    Save the sfdiagram as Stream.

    Declaration
    public void SaveAsImage(Stream stream, int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream.

    System.Int32 left

    left value of padding.

    System.Int32 top

    top value of padding.

    System.Int32 right

    right value of padding.

    System.Int32 bottom

    bottom value of padding.

    Remarks

    It only works in Android and iOS platform and not supported in UWP

    SaveAsImageAsync(Stream)

    Save the diagram as a Stream asynchronously.

    Declaration
    public Task SaveAsImageAsync(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream.

    Returns
    Type
    System.Threading.Tasks.Task

    SaveAsImageAsync(Stream, ImageFormat)

    Save the diagram as a Stream with a specific image format asynchronously.

    Declaration
    public Task SaveAsImageAsync(Stream stream, ImageFormat imageFormat)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Represents the stream.

    ImageFormat imageFormat

    Save image in provided format.

    Returns
    Type
    System.Threading.Tasks.Task

    SaveAsJson()

    Save Sfdiagram as JSON data.

    Declaration
    public string SaveAsJson()
    Returns
    Type Description
    System.String

    Save the sfdiagram in JSON format.

    Select(DiagramBaseItem)

    Select.

    Declaration
    public void Select(DiagramBaseItem baseItem)
    Parameters
    Type Name Description
    DiagramBaseItem baseItem

    DiagramBaseItem.

    SendBackward()

    Send Backward if the selected instance is intersects with othe instance.

    Declaration
    public void SendBackward()

    SendToBack()

    Send Back the selected instance.

    Declaration
    public void SendToBack()

    ShowSelectorHandle(Boolean, SelectorPosition)

    Changes the visibility of specified user handle.

    Declaration
    public void ShowSelectorHandle(bool visible, SelectorPosition position)
    Parameters
    Type Name Description
    System.Boolean visible

    visible.

    SelectorPosition position

    Selector Position.

    Undo()

    Undo the latest selected item in SfDiagram.

    Declaration
    public void Undo()

    Events

    BeginNodeLayout

    Occurs when a node starts to layout.

    Declaration
    public event BeginNodeLayoutEventHandler BeginNodeLayout
    Event Type
    Type
    BeginNodeLayoutEventHandler

    BeginNodeRender

    Occurs when a node starts to render in the diagram control.

    Declaration
    public event BeginNodeRenderEventHandler BeginNodeRender
    Event Type
    Type
    BeginNodeRenderEventHandler

    ConnectorClicked

    Occurs when connector is clicked.

    Declaration
    public event ConnectorClickEventHandler ConnectorClicked
    Event Type
    Type
    ConnectorClickEventHandler

    DiagramClicked

    Occurs when a click action happened in diagram.

    Declaration
    public event DiagramClickEventHandler DiagramClicked
    Event Type
    Type
    DiagramClickEventHandler

    DiagramObjectDeleted

    Occurs when diagram object is deleted.

    Declaration
    public event DiagramObjectDeletedEventHandler DiagramObjectDeleted
    Event Type
    Type
    DiagramObjectDeletedEventHandler

    DiagramObjectDropped

    Occurs when diagram object is dropped.

    Declaration
    public event DiagramObjectDroppedEventHandler DiagramObjectDropped
    Event Type
    Type
    DiagramObjectDroppedEventHandler

    DragEnd

    Occurs when a diagram object, completed its dragging.

    Declaration
    public event DragEndEventHandler DragEnd
    Event Type
    Type
    DragEndEventHandler

    EndNodeLayout

    Occurs when a node end to layout.

    Declaration
    public event EventHandler<EventArgs> EndNodeLayout
    Event Type
    Type
    System.EventHandler<System.EventArgs>

    ItemAdded

    Occurs when a diagram element is added.

    Declaration
    public event ItemAddedEventHandler ItemAdded
    Event Type
    Type
    ItemAddedEventHandler

    ItemLongPressed

    Occurs when item long pressed.

    Declaration
    public event ItemLongPressedEventHandler ItemLongPressed
    Event Type
    Type
    ItemLongPressedEventHandler

    LayoutNodeDropped

    Occurs when a diagram element is dropped.

    Declaration
    public event EventHandler<LayoutNodeDroppedEventArgs> LayoutNodeDropped
    Event Type
    Type
    System.EventHandler<LayoutNodeDroppedEventArgs>

    Loaded

    Occurs when diagram loaded.

    Declaration
    public event DiagramLoadedEventHandler Loaded
    Event Type
    Type
    DiagramLoadedEventHandler

    NodeClicked

    Occurs when node is clicked.

    Declaration
    public event NodeClickEventHandler NodeClicked
    Event Type
    Type
    NodeClickEventHandler

    OnTextEdit

    Occurs when a text data is edited.

    Declaration
    public event OnTextEditEventHandler OnTextEdit
    Event Type
    Type
    OnTextEditEventHandler

    ResizeEnd

    Occurs when a diagram object is resized.

    Declaration
    public event ResizeEndEventHandler ResizeEnd
    Event Type
    Type
    ResizeEndEventHandler

    RotateEnd

    Occurs when a node is rotated.

    Declaration
    public event RotateEndEventHandler RotateEnd
    Event Type
    Type
    RotateEndEventHandler

    SymbolGroupExpandCollapse

    Occurs when a symbol group is expanded or collapsed.

    Declaration
    public event SymbolGroupExpandCollapseEventHandler SymbolGroupExpandCollapse
    Event Type
    Type
    SymbolGroupExpandCollapseEventHandler

    TextChanged

    Occurs when a text is changed.

    Declaration
    public event TextChangedEventHandler TextChanged
    Event Type
    Type
    TextChangedEventHandler

    UserHandleClicked

    Occurs when user handle clicked.

    Declaration
    public event UserHandleClickedEventHandler UserHandleClicked
    Event Type
    Type
    UserHandleClickedEventHandler

    ZoomEnd

    Occurs when diagram object is zoom end.

    Declaration
    public event EventHandler<ZoomEndEventArgs> ZoomEnd
    Event Type
    Type
    System.EventHandler<ZoomEndEventArgs>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved