# diagram-flow-diagram

> Diagram that wires workflow shapes with directional connectors, building a flowchart with anchors and routing for process steps.

**Framework:** winforms  **Component:** Diagram  **Variant:** flow-diagram

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/winforms/diagram-flow-diagram.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.Diagram.Windows
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/diagram-flow-diagram/diagram.Designer.cs

```cs
using Syncfusion.Windows.Forms;

namespace FlowDiagram_2005
{
    public partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.groupBarItem1 = new Syncfusion.Windows.Forms.Tools.GroupBarItem();
            this.panel1 = new System.Windows.Forms.Panel();
            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
            this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.openToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.saveAsToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.exportToolStripButton = new System.Windows.Forms.ToolStripDropDownButton();
            this.pNGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.jPEGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.gIFToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.sVGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.undoToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.redoToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
            this.cutToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.copyToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.pasteToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.deleteToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
            this.CoonectorToolStripDropDownButton = new System.Windows.Forms.ToolStripDropDownButton();
            this.lineConnectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.directedLineConnectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.orthogonalConnectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.polylineConnectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.bezierConnectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.splineConnectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this.FillStyleToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.LineStyleToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.shadowToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.shadingToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
            this.panToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.zoomInToolStripButton = new System.Windows.Forms.ToolStripDropDownButton();
            this.zoomInToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.zoomOutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.resetZoomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
            this.gridToolStripButton = new System.Windows.Forms.ToolStripDropDownButton();
            this.showGridToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.snapToGridToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
            this.pageSettingsToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.previewToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.printToolStripButton = new System.Windows.Forms.ToolStripButton();
            this.colorDialog1 = new System.Windows.Forms.ColorDialog();
            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
            this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
            this.panel2 = new System.Windows.Forms.Panel();
            this.paletteGroupBar1 = new Syncfusion.Windows.Forms.Diagram.Controls.PaletteGroupBar(this.components);
            this.panel3 = new System.Windows.Forms.Panel();
            this.diagram1 = new Syncfusion.Windows.Forms.Diagram.Controls.Diagram(this.components);
            this.model1 = new Syncfusion.Windows.Forms.Diagram.Model(this.components);
            this.panel1.SuspendLayout();
            this.toolStrip1.SuspendLayout();
            this.panel2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.paletteGroupBar1)).BeginInit();
            this.panel3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.diagram1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.model1)).BeginInit();
            this.SuspendLayout();
            // 
            // groupBarItem1
            // 
            this.groupBarItem1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));
            this.groupBarItem1.Client = null;
            this.groupBarItem1.Text = "Flowchart Symbols";
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(237)))), ((int)(((byte)(240)))));
            this.panel1.Controls.Add(this.toolStrip1);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel1.Location = new System.Drawing.Point(0, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(1028, 60);
            this.panel1.TabIndex = 13;
            // 
            // toolStrip1
            // 
            this.toolStrip1.BackColor = System.Drawing.Color.Transparent;
            this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.newToolStripButton,
            this.openToolStripButton,
            this.saveToolStripButton,
            this.saveAsToolStripButton,
            this.exportToolStripButton,
            this.toolStripSeparator1,
            this.undoToolStripButton,
            this.redoToolStripButton,
            this.toolStripSeparator4,
            this.cutToolStripButton,
            this.copyToolStripButton,
            this.pasteToolStripButton,
            this.deleteToolStripButton,
            this.toolStripSeparator6,
            this.CoonectorToolStripDropDownButton,
            this.toolStripSeparator2,
            this.FillStyleToolStripButton,
            this.LineStyleToolStripButton,
            this.shadowToolStripButton,
            this.shadingToolStripButton,
            this.toolStripSeparator7,
            this.panToolStripButton,
            this.zoomInToolStripButton,
            this.toolStripSeparator5,
            this.gridToolStripButton,
            this.toolStripSeparator3,
            this.pageSettingsToolStripButton,
            this.previewToolStripButton,
            this.printToolStripButton});
            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
            this.toolStrip1.Name = "toolStrip1";
            this.toolStrip1.Size = new System.Drawing.Size(1028, 63);
            this.toolStrip1.TabIndex = 0;
            this.toolStrip1.Text = "toolStrip1";
            // 
            // newToolStripButton
            // 
            this.newToolStripButton.AutoSize = false;
            this.newToolStripButton.BackColor = System.Drawing.Color.Transparent;
            this.newToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image")));
            this.newToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.newToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.newToolStripButton.Name = "newToolStripButton";
            this.newToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(65), (int)DpiAware.LogicalToDeviceUnits(50));
            this.newToolStripButton.Text = "New";
            this.newToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.newToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.newToolStripButton.Click += new System.EventHandler(this.newToolStripButton_Click);
            // 
            // openToolStripButton
            // 
            this.openToolStripButton.AutoSize = false;
            this.openToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image")));
            this.openToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.openToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.openToolStripButton.Name = "openToolStripButton";
            this.openToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(65), (int)DpiAware.LogicalToDeviceUnits(50));
            this.openToolStripButton.Text = "Open";
            this.openToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.openToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.openToolStripButton.Click += new System.EventHandler(this.openToolStripButton_Click);
            // 
            // saveToolStripButton
            // 
            this.saveToolStripButton.AutoSize = false;
            this.saveToolStripButton.BackColor = System.Drawing.Color.Transparent;
            this.saveToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image")));
            this.saveToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.saveToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.saveToolStripButton.Name = "saveToolStripButton";
            this.saveToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.saveToolStripButton.Text = "Save";
            this.saveToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.saveToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripButton_Click);
            // 
            // saveAsToolStripButton
            // 
            this.saveAsToolStripButton.AutoSize = false;
            this.saveAsToolStripButton.BackColor = System.Drawing.Color.Transparent;
            this.saveAsToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveAsToolStripButton.Image")));
            this.saveAsToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.saveAsToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.saveAsToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.saveAsToolStripButton.Name = "saveAsToolStripButton";
            this.saveAsToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.saveAsToolStripButton.Text = "Save As";
            this.saveAsToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.saveAsToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.saveAsToolStripButton.Click += new System.EventHandler(this.saveAsToolStripButton_Click);
            // 
            // exportToolStripButton
            // 
            this.exportToolStripButton.AutoSize = false;
            this.exportToolStripButton.BackColor = System.Drawing.Color.Transparent;
            this.exportToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.exportToolStripButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.pNGToolStripMenuItem,
            this.jPEGToolStripMenuItem,
            this.gIFToolStripMenuItem,
            this.sVGToolStripMenuItem});
            this.exportToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("exportToolStripButton.Image")));
            this.exportToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.exportToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.exportToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.exportToolStripButton.Name = "exportToolStripButton";
            this.exportToolStripButton.ShowDropDownArrow = false;
            this.exportToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.exportToolStripButton.Text = "Export";
            this.exportToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.exportToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            // 
            // pNGToolStripMenuItem
            // 
            this.pNGToolStripMenuItem.Name = "pNGToolStripMenuItem";
            this.pNGToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
            this.pNGToolStripMenuItem.Text = "PNG";
            this.pNGToolStripMenuItem.Click += new System.EventHandler(this.pNGToolStripMenuItem_Click);
            // 
            // jPEGToolStripMenuItem
            // 
            this.jPEGToolStripMenuItem.Name = "jPEGToolStripMenuItem";
            this.jPEGToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
            this.jPEGToolStripMenuItem.Text = "JPEG";
            this.jPEGToolStripMenuItem.Click += new System.EventHandler(this.jPEGToolStripMenuItem_Click);
            // 
            // gIFToolStripMenuItem
            // 
            this.gIFToolStripMenuItem.Name = "gIFToolStripMenuItem";
            this.gIFToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
            this.gIFToolStripMenuItem.Text = "GIF";
            this.gIFToolStripMenuItem.Click += new System.EventHandler(this.gIFToolStripMenuItem_Click);
            // 
            // sVGToolStripMenuItem
            // 
            this.sVGToolStripMenuItem.Name = "sVGToolStripMenuItem";
            this.sVGToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
            this.sVGToolStripMenuItem.Text = "SVG";
            this.sVGToolStripMenuItem.Click += new System.EventHandler(this.sVGToolStripMenuItem_Click);
            // 
            // toolStripSeparator1
            // 
            this.toolStripSeparator1.AutoSize = false;
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(5, 60);
            // 
            // undoToolStripButton
            // 
            this.undoToolStripButton.AutoSize = false;
            this.undoToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.undoToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("undoToolStripButton.Image")));
            this.undoToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.undoToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.undoToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.undoToolStripButton.Name = "undoToolStripButton";
            this.undoToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.undoToolStripButton.Text = "Undo";
            this.undoToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.undoToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.undoToolStripButton.Click += new System.EventHandler(this.undoToolStripButton_Click);
            // 
            // redoToolStripButton
            // 
            this.redoToolStripButton.AutoSize = false;
            this.redoToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.redoToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("redoToolStripButton.Image")));
            this.redoToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.redoToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.redoToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.redoToolStripButton.Name = "redoToolStripButton";
            this.redoToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.redoToolStripButton.Text = "Redo";
            this.redoToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.redoToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.redoToolStripButton.Click += new System.EventHandler(this.redoToolStripButton_Click);
            // 
            // toolStripSeparator4
            // 
            this.toolStripSeparator4.AutoSize = false;
            this.toolStripSeparator4.Name = "toolStripSeparator4";
            this.toolStripSeparator4.Size = new System.Drawing.Size(5, 60);
            // 
            // cutToolStripButton
            // 
            this.cutToolStripButton.AutoSize = false;
            this.cutToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image")));
            this.cutToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.cutToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.cutToolStripButton.Name = "cutToolStripButton";
            this.cutToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.cutToolStripButton.Text = "Cut";
            this.cutToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.cutToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.cutToolStripButton.Click += new System.EventHandler(this.cutToolStripButton_Click);
            // 
            // copyToolStripButton
            // 
            this.copyToolStripButton.AutoSize = false;
            this.copyToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image")));
            this.copyToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.copyToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.copyToolStripButton.Name = "copyToolStripButton";
            this.copyToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.copyToolStripButton.Text = "Copy";
            this.copyToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.copyToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.copyToolStripButton.Click += new System.EventHandler(this.copyToolStripButton_Click);
            // 
            // pasteToolStripButton
            // 
            this.pasteToolStripButton.AutoSize = false;
            this.pasteToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.pasteToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image")));
            this.pasteToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.pasteToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.pasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.pasteToolStripButton.Name = "pasteToolStripButton";
            this.pasteToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.pasteToolStripButton.Text = "Paste";
            this.pasteToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.pasteToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.pasteToolStripButton.Click += new System.EventHandler(this.pasteToolStripButton_Click);
            // 
            // deleteToolStripButton
            // 
            this.deleteToolStripButton.AutoSize = false;
            this.deleteToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.deleteToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("deleteToolStripButton.Image")));
            this.deleteToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.deleteToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.deleteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.deleteToolStripButton.Name = "deleteToolStripButton";
            this.deleteToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.deleteToolStripButton.Text = "Delete";
            this.deleteToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.deleteToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.deleteToolStripButton.Click += new System.EventHandler(this.deleteToolStripButton_Click);
            // 
            // toolStripSeparator6
            // 
            this.toolStripSeparator6.AutoSize = false;
            this.toolStripSeparator6.Name = "toolStripSeparator6";
            this.toolStripSeparator6.Size = new System.Drawing.Size(5, 60);
            // 
            // CoonectorToolStripDropDownButton
            // 
            this.CoonectorToolStripDropDownButton.AutoSize = false;
            this.CoonectorToolStripDropDownButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.lineConnectorToolStripMenuItem,
            this.directedLineConnectorToolStripMenuItem,
            this.orthogonalConnectorToolStripMenuItem,
            this.polylineConnectorToolStripMenuItem,
            this.bezierConnectorToolStripMenuItem,
            this.splineConnectorToolStripMenuItem});
            this.CoonectorToolStripDropDownButton.Image = ((System.Drawing.Image)(resources.GetObject("CoonectorToolStripDropDownButton.Image")));
            this.CoonectorToolStripDropDownButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.CoonectorToolStripDropDownButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.CoonectorToolStripDropDownButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.CoonectorToolStripDropDownButton.Name = "CoonectorToolStripDropDownButton";
            this.CoonectorToolStripDropDownButton.ShowDropDownArrow = false;
            this.CoonectorToolStripDropDownButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(80), (int)DpiAware.LogicalToDeviceUnits(50));
            this.CoonectorToolStripDropDownButton.Text = "Connectors";
            this.CoonectorToolStripDropDownButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.CoonectorToolStripDropDownButton.DropDownItemClicked += CoonectorToolStripDropDownButton_DropDownItemClicked;
            this.CoonectorToolStripDropDownButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            // 
            // lineConnectorToolStripMenuItem
            // 
            this.lineConnectorToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.lineConnectorToolStripMenuItem.Name = "lineConnectorToolStripMenuItem";
            this.lineConnectorToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
            this.lineConnectorToolStripMenuItem.Text = "Line connector";
            this.lineConnectorToolStripMenuItem.Click += new System.EventHandler(this.lineConnectorToolStripMenuItem_Click);
            // 
            // directedLineConnectorToolStripMenuItem
            // 
            this.directedLineConnectorToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.directedLineConnectorToolStripMenuItem.Name = "directedLineConnectorToolStripMenuItem";
            this.directedLineConnectorToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
            this.directedLineConnectorToolStripMenuItem.Text = "DirectedLine Connector";
            // 
            // orthogonalConnectorToolStripMenuItem
            // 
            this.orthogonalConnectorToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.orthogonalConnectorToolStripMenuItem.Name = "orthogonalConnectorToolStripMenuItem";
            this.orthogonalConnectorToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
            this.orthogonalConnectorToolStripMenuItem.Text = "Orthogonal Connector";
            this.orthogonalConnectorToolStripMenuItem.Click += new System.EventHandler(this.orthogonalConnectorToolStripMenuItem_Click);
            // 
            // polylineConnectorToolStripMenuItem
            // 
            this.polylineConnectorToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.polylineConnectorToolStripMenuItem.Name = "polylineConnectorToolStripMenuItem";
            this.polylineConnectorToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
            this.polylineConnectorToolStripMenuItem.Text = "Polyline Connector";
            this.polylineConnectorToolStripMenuItem.Click += new System.EventHandler(this.polylineConnectorToolStripMenuItem_Click);
            // 
            // bezierConnectorToolStripMenuItem
            // 
            this.bezierConnectorToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.bezierConnectorToolStripMenuItem.Name = "bezierConnectorToolStripMenuItem";
            this.bezierConnectorToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
            this.bezierConnectorToolStripMenuItem.Text = "Bezier Connector";
            this.bezierConnectorToolStripMenuItem.Click += new System.EventHandler(this.bezierConnectorToolStripMenuItem_Click);
            // 
            // splineConnectorToolStripMenuItem
            // 
            this.splineConnectorToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.splineConnectorToolStripMenuItem.Name = "splineConnectorToolStripMenuItem";
            this.splineConnectorToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
            this.splineConnectorToolStripMenuItem.Text = "Spline Connector";
            this.splineConnectorToolStripMenuItem.Click += new System.EventHandler(this.splineConnectorToolStripMenuItem_Click);
            // 
            // toolStripSeparator2
            // 
            this.toolStripSeparator2.AutoSize = false;
            this.toolStripSeparator2.Name = "toolStripSeparator2";
            this.toolStripSeparator2.Size = new System.Drawing.Size(5, 60);
            // 
            // FillStyleToolStripButton
            // 
            this.FillStyleToolStripButton.AutoSize = false;
            this.FillStyleToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("FillStyleToolStripButton.Image")));
            this.FillStyleToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.FillStyleToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.FillStyleToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.FillStyleToolStripButton.Name = "FillStyleToolStripButton";
            this.FillStyleToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(70), (int)DpiAware.LogicalToDeviceUnits(50));
            this.FillStyleToolStripButton.Text = "FillStyle";
            this.FillStyleToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.FillStyleToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.FillStyleToolStripButton.Click += new System.EventHandler(this.FillStyleToolStripButton_Click);
            // 
            // LineStyleToolStripButton
            // 
            this.LineStyleToolStripButton.AutoSize = false;
            this.LineStyleToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("LineStyleToolStripButton.Image")));
            this.LineStyleToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.LineStyleToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.LineStyleToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.LineStyleToolStripButton.Name = "LineStyleToolStripButton";
            this.LineStyleToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(70), (int)DpiAware.LogicalToDeviceUnits(50));
            this.LineStyleToolStripButton.Text = "Line Style";
            this.LineStyleToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.LineStyleToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.LineStyleToolStripButton.Click += new System.EventHandler(this.LineStyleToolStripButton_Click);
            // 
            // shadowToolStripButton
            // 
            this.shadowToolStripButton.AutoSize = false;
            this.shadowToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("shadowToolStripButton.Image")));
            this.shadowToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.shadowToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.shadowToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.shadowToolStripButton.Name = "shadowToolStripButton";
            this.shadowToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.shadowToolStripButton.Text = "Shadow";
            this.shadowToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.shadowToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.shadowToolStripButton.Click += new System.EventHandler(this.shadowToolStripButton_Click);
            // 
            // shadingToolStripButton
            // 
            this.shadingToolStripButton.AutoSize = false;
            this.shadingToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("shadingToolStripButton.Image")));
            this.shadingToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.shadingToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.shadingToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.shadingToolStripButton.Name = "shadingToolStripButton";
            this.shadingToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.shadingToolStripButton.Text = "Shading";
            this.shadingToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.shadingToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.shadingToolStripButton.Click += new System.EventHandler(this.shadingToolStripButton_Click);
            // 
            // toolStripSeparator7
            // 
            this.toolStripSeparator7.AutoSize = false;
            this.toolStripSeparator7.Name = "toolStripSeparator7";
            this.toolStripSeparator7.Size = new System.Drawing.Size(5, 60);
            // 
            // panToolStripButton
            // 
            this.panToolStripButton.AutoSize = false;
            this.panToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("panToolStripButton.Image")));
            this.panToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.panToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.panToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.panToolStripButton.Name = "panToolStripButton";
            this.panToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(65), (int)DpiAware.LogicalToDeviceUnits(50));
            this.panToolStripButton.Text = "Pan Tool";
            this.panToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.panToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.panToolStripButton.Click += new System.EventHandler(this.panToolStripButton_Click);
            // 
            // zoomInToolStripButton
            // 
            this.zoomInToolStripButton.AutoSize = false;
            this.zoomInToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.zoomInToolStripButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.zoomInToolStripMenuItem,
            this.zoomOutToolStripMenuItem,
            this.resetZoomToolStripMenuItem});
            this.zoomInToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("zoomInToolStripButton.Image")));
            this.zoomInToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.zoomInToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.zoomInToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.zoomInToolStripButton.Name = "zoomInToolStripButton";
            this.zoomInToolStripButton.ShowDropDownArrow = false;
            this.zoomInToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.zoomInToolStripButton.Text = "Zoom";
            this.zoomInToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.zoomInToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            // 
            // zoomInToolStripMenuItem
            // 
            this.zoomInToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.zoomInToolStripMenuItem.Name = "zoomInToolStripMenuItem";
            this.zoomInToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
            this.zoomInToolStripMenuItem.Text = "ZoomIn";
            this.zoomInToolStripMenuItem.Click += new System.EventHandler(this.zoomInToolStripMenuItem_Click);
            // 
            // zoomOutToolStripMenuItem
            // 
            this.zoomOutToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.zoomOutToolStripMenuItem.Name = "zoomOutToolStripMenuItem";
            this.zoomOutToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
            this.zoomOutToolStripMenuItem.Text = "ZoomOut";
            this.zoomOutToolStripMenuItem.Click += new System.EventHandler(this.zoomOutToolStripMenuItem_Click);
            // 
            // resetZoomToolStripMenuItem
            // 
            this.resetZoomToolStripMenuItem.BackColor = System.Drawing.Color.White;
            this.resetZoomToolStripMenuItem.Name = "resetZoomToolStripMenuItem";
            this.resetZoomToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
            this.resetZoomToolStripMenuItem.Text = "Reset";
            this.resetZoomToolStripMenuItem.Click += new System.EventHandler(this.resetZoomToolStripMenuItem_Click);
            // 
            // toolStripSeparator5
            // 
            this.toolStripSeparator5.AutoSize = false;
            this.toolStripSeparator5.Name = "toolStripSeparator5";
            this.toolStripSeparator5.Size = new System.Drawing.Size(5, 60);
            // 
            // gridToolStripButton
            // 
            this.gridToolStripButton.AutoSize = false;
            this.gridToolStripButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.showGridToolStripMenuItem,
            this.snapToGridToolStripMenuItem1});
            this.gridToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("gridToolStripButton.Image")));
            this.gridToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.gridToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.gridToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.gridToolStripButton.Name = "gridToolStripButton";
            this.gridToolStripButton.ShowDropDownArrow = false;
            this.gridToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(60), (int)DpiAware.LogicalToDeviceUnits(50));
            this.gridToolStripButton.Text = "Grid";
            this.gridToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.gridToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            // 
            // showGridToolStripMenuItem
            // 
            this.showGridToolStripMenuItem.CheckOnClick = true;
            this.showGridToolStripMenuItem.Name = "showGridToolStripMenuItem";
            this.showGridToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
            this.showGridToolStripMenuItem.Text = "Grid";
            this.showGridToolStripMenuItem.Click += new System.EventHandler(this.showGridToolStripMenuItem_Click_1);
            // 
            // snapToGridToolStripMenuItem1
            // 
            this.snapToGridToolStripMenuItem1.Checked = true;
            this.snapToGridToolStripMenuItem1.CheckOnClick = true;
            this.snapToGridToolStripMenuItem1.CheckState = System.Windows.Forms.CheckState.Checked;
            this.snapToGridToolStripMenuItem1.Name = "snapToGridToolStripMenuItem1";
            this.snapToGridToolStripMenuItem1.Size = new System.Drawing.Size(136, 22);
            this.snapToGridToolStripMenuItem1.Text = "SnapToGrid";
            this.snapToGridToolStripMenuItem1.Click += new System.EventHandler(this.snapToGridToolStripMenuItem1_Click);
            // 
            // toolStripSeparator3
            // 
            this.toolStripSeparator3.AutoSize = false;
            this.toolStripSeparator3.Name = "toolStripSeparator3";
            this.toolStripSeparator3.Size = new System.Drawing.Size(5, 60);
            // 
            // pageSettingsToolStripButton
            // 
            this.pageSettingsToolStripButton.AutoSize = false;
            this.pageSettingsToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.pageSettingsToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("pageSettingsToolStripButton.Image")));
            this.pageSettingsToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.pageSettingsToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.pageSettingsToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.pageSettingsToolStripButton.Name = "pageSettingsToolStripButton";
            this.pageSettingsToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(65), (int)DpiAware.LogicalToDeviceUnits(50));
            this.pageSettingsToolStripButton.Text = "Settings";
            this.pageSettingsToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.pageSettingsToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.pageSettingsToolStripButton.Click += new System.EventHandler(this.pageSettingsToolStripButton_Click);

#if NETCOREAPP3_0_OR_GREATER

            this.pageSettingsToolStripButton.Visible = false;

#endif

            // 
            // previewToolStripButton
            // 
            this.previewToolStripButton.AutoSize = false;
            this.previewToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.previewToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("previewToolStripButton.Image")));
            this.previewToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.previewToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.previewToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.previewToolStripButton.Name = "previewToolStripButton";
            this.previewToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(65), (int)DpiAware.LogicalToDeviceUnits(50));
            this.previewToolStripButton.Text = "Preview";
            this.previewToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.previewToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.previewToolStripButton.Click += new System.EventHandler(this.previewToolStripButton_Click);
            // 
            // printToolStripButton
            // 
            this.printToolStripButton.AutoSize = false;
            this.printToolStripButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.printToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripButton.Image")));
            this.printToolStripButton.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
            this.printToolStripButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.printToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.printToolStripButton.Name = "printToolStripButton";
            this.printToolStripButton.Size = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(65), (int)DpiAware.LogicalToDeviceUnits(50));
            this.printToolStripButton.Text = "Print";
            this.printToolStripButton.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.printToolStripButton.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
            this.printToolStripButton.Click += new System.EventHandler(this.printToolStripButton_Click);
            // 
            // openFileDialog1
            // 
            this.openFileDialog1.FileName = "openFileDialog1";
            // 
            // panel2
            // 
            this.panel2.BackColor = System.Drawing.SystemColors.Control;
            this.panel2.Controls.Add(this.paletteGroupBar1);
            this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
            this.panel2.Location = new System.Drawing.Point(0, 60);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(218, 549);
            this.panel2.TabIndex = 14;
            // 
            // paletteGroupBar1
            // 
            this.paletteGroupBar1.AllowDrop = true;
            this.paletteGroupBar1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
            this.paletteGroupBar1.BorderColor = System.Drawing.Color.White;
            this.paletteGroupBar1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.paletteGroupBar1.Diagram = null;
            this.paletteGroupBar1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.paletteGroupBar1.EditMode = false;
            this.paletteGroupBar1.ExpandButtonToolTip = null;
            this.paletteGroupBar1.FlatLook = true;
            this.paletteGroupBar1.Font = new System.Drawing.Font("Segoe UI Semibold", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.paletteGroupBar1.ForeColor = System.Drawing.Color.White;
            this.paletteGroupBar1.GroupBarDropDownToolTip = null;
            this.paletteGroupBar1.GroupBarItemHeight = 32;
            this.paletteGroupBar1.IndexOnVisibleItems = true;
            this.paletteGroupBar1.Location = new System.Drawing.Point(0, 0);
            this.paletteGroupBar1.MinimizeButtonToolTip = null;
            this.paletteGroupBar1.Name = "paletteGroupBar1";
            this.paletteGroupBar1.NavigationPaneTooltip = null;
            this.paletteGroupBar1.PopupClientSize = new System.Drawing.Size(0, 0);
            this.paletteGroupBar1.Size = new System.Drawing.Size(218, 549);
            this.paletteGroupBar1.TabIndex = 1;
            this.paletteGroupBar1.Text = "paletteGroupBar1";
            this.paletteGroupBar1.TextAlign = Syncfusion.Windows.Forms.Tools.TextAlignment.Left;
            this.paletteGroupBar1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Metro;
            // 
            // panel3
            // 
            this.panel3.Controls.Add(this.diagram1);
            this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel3.Location = new System.Drawing.Point(218, 60);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(810, 549);
            this.panel3.TabIndex = 15;
            // 
            // diagram1
            // 
            this.diagram1.Controller.PasteOffset = new System.Drawing.SizeF(10F, 10F);
            this.diagram1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.diagram1.LayoutManager = null;
            this.diagram1.Location = new System.Drawing.Point(0, 0);
            this.diagram1.MetroScrollBars = true;
            this.diagram1.Model = this.model1;
            this.diagram1.Name = "diagram1";
            this.diagram1.ScrollVirtualBounds = new System.Drawing.RectangleF(0, 0, 0, 0);
            this.diagram1.Size = new System.Drawing.Size(810, 549);
            this.diagram1.SmartSizeBox = false;
            this.diagram1.TabIndex = 0;
            this.diagram1.Text = "diagram1";
            // 
            // 
            // 
            this.diagram1.View.BackgroundColor = System.Drawing.Color.White;
            this.diagram1.View.ClientRectangle = new System.Drawing.Rectangle(0, 0, 0, 0);
            this.diagram1.View.Controller = this.diagram1.Controller;
            this.diagram1.View.Grid.MinPixelSpacing = 4F;
            this.diagram1.View.Grid.Visible = false;
            this.diagram1.View.ScrollVirtualBounds = new System.Drawing.RectangleF(0, 0, 0, 0);
            this.diagram1.View.ZoomType = Syncfusion.Windows.Forms.Diagram.ZoomType.Center;
            // 
            // model1
            // 
            this.model1.BackgroundStyle.PathBrushStyle = Syncfusion.Windows.Forms.Diagram.PathGradientBrushStyle.RectangleCenter;
            this.model1.DocumentScale.DisplayName = "No Scale";
            this.model1.DocumentScale.Height = 1F;
            this.model1.DocumentScale.Width = 1F;
            this.model1.DocumentSize.Height = 1169F;
            this.model1.DocumentSize.Width = 827F;
            this.model1.LineStyle.DashPattern = null;
            this.model1.LineStyle.LineColor = System.Drawing.Color.Black;
            this.model1.LineStyle.LineWidth = 0F;
            this.model1.LogicalSize = new System.Drawing.SizeF(827F, 1169F);
            this.model1.ShadowStyle.Color = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(105)))), ((int)(((byte)(105)))), ((int)(((byte)(105)))));
            this.model1.ShadowStyle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(105)))), ((int)(((byte)(105)))), ((int)(((byte)(105)))));
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.White;
            this.ClientSize = new System.Drawing.Size(1028, 609);
            this.Controls.Add(this.panel3);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.panel1);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Flow Diagram";
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            this.panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.paletteGroupBar1)).EndInit();
            this.panel3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.diagram1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.model1)).EndInit();
            this.ResumeLayout(false);

        }
        
        #endregion

        private Syncfusion.Windows.Forms.Tools.GroupBarItem groupBarItem1;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.ColorDialog colorDialog1;
        private System.Windows.Forms.OpenFileDialog openFileDialog1;
        private System.Windows.Forms.SaveFileDialog saveFileDialog1;
        private System.Windows.Forms.ToolStrip toolStrip1;
        private System.Windows.Forms.ToolStripButton saveToolStripButton;
        private System.Windows.Forms.ToolStripButton undoToolStripButton;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
        private System.Windows.Forms.ToolStripButton redoToolStripButton;
        private System.Windows.Forms.ToolStripButton cutToolStripButton;
        private System.Windows.Forms.ToolStripButton copyToolStripButton;
        private System.Windows.Forms.ToolStripButton pasteToolStripButton;
        private System.Windows.Forms.ToolStripButton deleteToolStripButton;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
        private System.Windows.Forms.ToolStripButton saveAsToolStripButton;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
        private System.Windows.Forms.ToolStripDropDownButton gridToolStripButton;
        private System.Windows.Forms.ToolStripMenuItem showGridToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem snapToGridToolStripMenuItem1;
        private System.Windows.Forms.ToolStripDropDownButton exportToolStripButton;
        private System.Windows.Forms.ToolStripMenuItem pNGToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem jPEGToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem gIFToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem sVGToolStripMenuItem;
        private System.Windows.Forms.ToolStripDropDownButton CoonectorToolStripDropDownButton;
        private System.Windows.Forms.ToolStripMenuItem lineConnectorToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem directedLineConnectorToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem orthogonalConnectorToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem polylineConnectorToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem bezierConnectorToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem splineConnectorToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
        private System.Windows.Forms.ToolStripButton FillStyleToolStripButton;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
        private System.Windows.Forms.ToolStripButton LineStyleToolStripButton;
        private System.Windows.Forms.ToolStripButton shadowToolStripButton;
        private System.Windows.Forms.ToolStripButton shadingToolStripButton;
        private System.Windows.Forms.ToolStripDropDownButton zoomInToolStripButton;
        private System.Windows.Forms.ToolStripMenuItem zoomOutToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem zoomInToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem resetZoomToolStripMenuItem;
        private System.Windows.Forms.Panel panel2;
        private Syncfusion.Windows.Forms.Diagram.Controls.PaletteGroupBar paletteGroupBar1;
        private System.Windows.Forms.Panel panel3;
        private Syncfusion.Windows.Forms.Diagram.Controls.Diagram diagram1;
        private Syncfusion.Windows.Forms.Diagram.Model model1;
        private System.Windows.Forms.ToolStripButton panToolStripButton;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
        private System.Windows.Forms.ToolStripButton pageSettingsToolStripButton;
        private System.Windows.Forms.ToolStripButton previewToolStripButton;
        private System.Windows.Forms.ToolStripButton printToolStripButton;
        private System.Windows.Forms.ToolStripButton newToolStripButton;
        private System.Windows.Forms.ToolStripButton openToolStripButton;
        
    }
}

```

### src/components/diagram-flow-diagram/diagram.cs

```cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Syncfusion.Windows.Forms.Diagram;
using System.IO;
using System.Drawing.Drawing2D;
using Syncfusion.Windows.Forms.Diagram.Controls;
using Syncfusion.Windows.Forms.Tools;
using System.Drawing.Printing;
using System.Diagnostics;
using System.Drawing.Imaging;
using Syncfusion.SVG.IO;
using Syncfusion.Windows.Forms;

namespace FlowDiagram_2005
{
    public partial class Form1 : Form
    {
        #region Members
        Syncfusion.Windows.Forms.Diagram.Label lbl;
        bool needSave = false;
        public string fileName;
        #endregion

        #region Form Initialize
        public Form1()
        {
            InitializeComponent();

#if !(NETCORE || NET50 || NET80 || NET60 || NET70 || NET90)
            paletteGroupBar1.LoadPalette(@"..\..\..\..\..\..\common\Data\Diagram\xml\Flowchart Symbols.xml");
#else
            string flowchartPalette = FlowDiagramDataSource.GetPaletteXmlPath();
            if (flowchartPalette != null)
            {
                paletteGroupBar1.LoadPalette(flowchartPalette);
            }
#endif

            this.diagram1.BeginUpdate();
            this.diagram1.Model.RenderingStyle.SmoothingMode = SmoothingMode.HighQuality;
            this.diagram1.Model.BoundaryConstraintsEnabled = false;
            diagram1.Model.HistoryManager.Pause();
            InitailizeDiagram();
            diagram1.Model.HistoryManager.Resume();
            this.diagram1.View.SelectionList.Clear();
            GroupBarAppearance();
            this.diagram1.EndUpdate();

            // Wire up OnIdle processing
            Application.Idle += new EventHandler(Application_Idle);
            this.Disposed += (s, e) => Application.Idle -= Application_Idle;
        }
#endregion

#region Initailize Diagram with nodes
        /// <summary>
        /// Initialize the diagram
        /// </summary>
        protected void InitailizeDiagram()
        {           
            // Add a TextNode to highlight the Diagram Name
            Syncfusion.Windows.Forms.Diagram.TextNode txtnode = new TextNode(FlowDiagramDataSource.TitleText);
            txtnode.FontStyle.Size = 17;
            txtnode.FontStyle.Bold = true;
            txtnode.FontStyle.Family = "Arial";
            txtnode.FontColorStyle.Color = Color.Black;
            txtnode.LineStyle.LineColor = Color.Transparent;
            txtnode.SizeToText(Size.Empty);
            InsertNode(txtnode, new PointF(290, 15));

            if (this.paletteGroupBar1.CurrentSymbolPalette == null)
                return;
            //WF-63521 Off-page reference, Manual operation, Loop limit nodes handle mode is set to resize.
            else
            {
                foreach (Node node in this.paletteGroupBar1.CurrentSymbolPalette.Nodes as NodeCollection)
                {
                    if (node.FullName == "Off-page reference" || node.FullName == "Manual operation" || node.FullName == "Loop limit")
                    {
                        node.EditStyle.DefaultHandleEditMode = HandleEditMode.Resize;
                    }
                }
            }

            // Insert the Network Symbols.
            // Insert start  
            Node start = InsertNodeFromPallete("Start/End", new PointF(295, 37), "Start", new SizeF(120,45));
            //Insert process1  
            Node process1 = InsertNodeFromPallete("Process", new PointF(325, 102), "Answer Phone", new SizeF(120, 45));
            // Insert decision1
            Node decision1 = InsertNodeFromPallete("Decision", new PointF(325, 175), "How can we help?", new SizeF(120, 60));
            //Insert process2 
            Node process2 = InsertNodeFromPallete("Process", new PointF(70, 252), "Take name and company", new SizeF(120, 45));
            // Insert process3
            Node process3 = InsertNodeFromPallete("Process", new PointF(70, 327), "Transfer to sales", new SizeF(120, 45));
            //Insert end1 
            Node end1 = InsertNodeFromPallete("Start/End", new PointF(40, 402), "Finish", new SizeF(120, 45));
            //Insert decision2 
            Node decision2 = InsertNodeFromPallete("Decision", new PointF(325, 255), "What is problem?", new SizeF(120, 60));
            //Insert process4
            Node process4 = InsertNodeFromPallete("Process", new PointF(325, 330), "Take name and company", new SizeF(120, 45));
            //Insert process5
            Node process5 = InsertNodeFromPallete("Process", new PointF(325, 390), "Transfer to help", new SizeF(120, 45));
            //Insert end2
            Node end2 = InsertNodeFromPallete("Start/End", new PointF(295, 465), "Finish", new SizeF(120, 45));

            //	Add TextNodes to display Layer Names
            InsertTextNode("Product info, or help placing order", new PointF(130, 180), new SizeF(135,35));
            InsertTextNode("Other", new PointF(480, 200), new SizeF(90,30));
            InsertTextNode("Shipping", new PointF(235, 280), new SizeF(90,30));
            InsertTextNode("Billing", new PointF(480, 280), new SizeF(90,30));
            InsertTextNode("Problems with product?", new PointF(272, 316), new SizeF(90,30));

            // Create Links between the NetworkSymbols.
            ConnectNodes(start, process1);
            ConnectNodes(process1, decision1);           
            ConnectNodes(decision1, process2);
            ConnectNodes(process2, process3);            
            ConnectNodes(process3, end1);
            ConnectNodes(decision1, decision2);
            ConnectNodes(decision2, process4);
            ConnectNodes(process4, process5);
            ConnectNodes(process5, end2);

            ConnectNodes(decision1, "right");
            ConnectNodes(decision2,  "right");
            ConnectNodes(decision2,"left");
        }

        /// <summary>
        /// Insert the node
        /// </summary>
        /// <param name="strText">TextNode's text</param>
        /// <param name="ptPinPoint">Node's Location </param>
        /// <param name="nodeSize">Node's size</param>
        /// <returns>returns the node</returns>
        private TextNode InsertTextNode(string strText, PointF ptPinPoint, SizeF nodeSize)
        {
            Syncfusion.Windows.Forms.Diagram.TextNode txtnode = new TextNode(strText);

            txtnode.FontStyle.Size = 10;
            txtnode.FontStyle.Family = "Arial";
            txtnode.FontColorStyle.Color = Color.Black;
            txtnode.LineStyle.LineColor = Color.Transparent;
            txtnode.Size = nodeSize;
           
            InsertNode(txtnode, ptPinPoint);
            return txtnode;
        }
      
        /// <summary>
        /// Inserts the node
        /// </summary>
        /// <param name="node">Node</param>
        /// <param name="ptPinPoint">Node's Location</param>
        /// <returns>returns the node</returns>
        private Node InsertNode(Node node, PointF ptPinPoint)
        {
            MeasureUnits units = MeasureUnits.Pixel;
            SizeF szPinOffset = ((IUnitIndependent)node).GetPinPointOffset(units);
            ptPinPoint.X += szPinOffset.Width;
            ptPinPoint.Y += szPinOffset.Height;
            ((IUnitIndependent)node).SetPinPoint(ptPinPoint, units);
            node.EnableCentralPort = true;
            this.diagram1.Model.AppendChild(node);
            return node;
        }
      
        /// <summary>
        /// Insert the node from palette
        /// </summary>
        /// <param name="name">Node name</param>
        /// <param name="ptPinPoint">Node location</param>
        /// <param name="label">Label's text</param>
        /// <param name="nodeSize">Node size</param>
        /// <returns>returns the node</returns>
        private Node InsertNodeFromPallete(string name, PointF ptPinPoint, string label, SizeF nodeSize)
        {
            Node node = null;
            NodeCollection nodes = paletteGroupBar1.CurrentSymbolPalette.Nodes;

            if (name != null)
            {
                node = (Node)nodes[name].Clone();
                InsertNode(node, ptPinPoint);
            }

            //Set Node's size
            node.Size = nodeSize;
            //Add labels to node
            lbl = new Syncfusion.Windows.Forms.Diagram.Label(node, label);
            lbl.FontStyle.Family = "Arial";
            ((PathNode)node).Labels.Add(lbl);      

            return node;
        }
       
        /// <summary>
        /// Connects the node
        /// </summary>
        /// <param name="parentNode">parent node</param>
        /// <param name="subNode">child node</param>
        private void ConnectNodes(Node parentNode, Node subNode)
        {
            if (parentNode.CentralPort == null || subNode.CentralPort == null)
                return;

            this.diagram1.Model.BeginUpdate();
            // Create directed link
            PointF[] pts = new PointF[] { PointF.Empty, new PointF(0, 1) };
            OrthogonalConnector line = new OrthogonalConnector(pts[0], pts[1]);
            line.HeadDecorator.DecoratorShape = DecoratorShape.Filled45Arrow;
            line.HeadDecorator.FillStyle.Color = Color.Black;           
            line.LineStyle.LineColor = Color.Black;
            this.diagram1.Model.AppendChild(line);
            //Connect connectors's end points to the node ports. 
            parentNode.CentralPort.TryConnect(line.TailEndPoint);
            subNode.CentralPort.TryConnect(line.HeadEndPoint);
            this.diagram1.Model.SendToBack(line);
            this.diagram1.Model.EndUpdate();
        }

        /// <summary>
        /// Connect the nodes
        /// </summary>
        /// <param name="parentNode">parent node</param>
        /// <param name="position">node's position</param>
        private void ConnectNodes(Node parentNode, string position)
        {
            if (parentNode.CentralPort == null )
                return;
            PointF[] pts;
            OrthogonalConnector line;
            this.diagram1.Model.BeginUpdate();

            // Create directed link
            if (position == "right")
            {
                pts = new PointF[] { parentNode.PinPoint, new PointF(parentNode.PinPoint.X + 200, parentNode.PinPoint.Y) };
                line = new OrthogonalConnector(pts[0], pts[1]);
            }
            else
            {
                pts = new PointF[] { parentNode.PinPoint, new PointF(parentNode.PinPoint.X - 150, parentNode.PinPoint.Y + 220) };
                line = new OrthogonalConnector(pts[0], pts[1],true);
            }
            line.HeadDecorator.DecoratorShape = DecoratorShape.Filled45Arrow;
            line.HeadDecorator.FillStyle.Color = Color.Black;            
            line.LineStyle.LineColor = Color.Black;

            this.diagram1.Model.AppendChild(line);

            parentNode.CentralPort.TryConnect(line.TailEndPoint);            
            this.diagram1.Model.SendToBack(line);

            this.diagram1.Model.EndUpdate();
        }
#endregion

#region ChangeApperance of controls
        /// <summary>
        /// Change's the appearance of GroupBar
        /// </summary>
        private void GroupBarAppearance()
        {
            this.paletteGroupBar1.BorderColor = System.Drawing.ColorTranslator.FromHtml("#119EDA");
            foreach (GroupBarItem item in paletteGroupBar1.GroupBarItems)
            {
                //palette view settings
                if (item.Client is PaletteGroupView)
                {
                    PaletteGroupView view = item.Client as PaletteGroupView;
                    view.Font = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                    view.ForeColor = Color.Black;
                    view.FlowView = true;
                    view.ShowToolTips = true;
                    view.ShowFlowViewItemText = true;
                    view.SelectedItemColor = Color.FromArgb(255, 219, 118);
                    view.HighlightItemColor = Color.FromArgb(255, 227, 149);
                    view.SelectingItemColor = Color.FromArgb(255, 238, 184);
                    view.SelectedHighlightItemColor = Color.FromArgb(255, 218, 115);
                    view.FlowViewItemTextLength = (int)DpiAware.LogicalToDeviceUnits(80);
                    view.BackColor = Color.White;
                    view.TextWrap = true;
                    view.FlatLook = true;
                    view.BorderStyle = BorderStyle.FixedSingle;
                }
            }
        }

        /// <summary>
        /// Sets the Appearance of Diagram
        /// </summary>
        private void DiagramAppearance()
        {
            this.diagram1.HorizontalRuler.BackgroundColor = Color.White;
            this.diagram1.VerticalRuler.BackgroundColor = Color.White;  
            this.diagram1.View.Grid.GridStyle = GridStyle.Line;
            this.diagram1.View.Grid.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
            this.diagram1.View.Grid.Color = Color.LightGray;
            this.diagram1.View.Grid.VerticalSpacing = 15;
            this.diagram1.View.Grid.HorizontalSpacing = 15;
            this.diagram1.Model.BackgroundStyle.GradientCenter = 0.5f;
            this.diagram1.View.HandleRenderer.HandleColor = Color.AliceBlue;
            this.diagram1.View.HandleRenderer.HandleOutlineColor = Color.SkyBlue;
            this.diagram1.Model.RenderingStyle.SmoothingMode = SmoothingMode.HighQuality;
            this.diagram1.View.Grid.Visible = false;
            this.diagram1.View.BackgroundColor = Color.White;
            this.diagram1.Model.DocumentSize = new PageSize(500, 500);
            this.diagram1.View.SelectionList.Clear();
        }

        #endregion

        #region Properties

        
         bool SaveChanges
        {
            get
            {
                if (diagram1.Model.Modified || needSave)
                    return true;
                else
                    return false;
            }
            set
            {
                needSave = value;
            }
        }

        public bool HasFileName
        {
            get
            {
                return (this.fileName != null && this.fileName.Length > 0);
            }
        }

#endregion

#region Event Handlers
        
        
        
        void Application_Idle(object sender, EventArgs e)
        {
            if (this.diagram1 != null && this.diagram1.Model != null)
            {
                this.saveToolStripButton.Enabled = true;
                this.saveAsToolStripButton.Enabled = true;
                this.cutToolStripButton.Enabled = diagram1.CanCut;
                this.copyToolStripButton.Enabled = diagram1.CanCopy;
                if (this.WindowState != FormWindowState.Minimized)
                    this.pasteToolStripButton.Enabled = diagram1.CanPaste;
                this.undoToolStripButton.Enabled = diagram1.Model.HistoryManager.CanUndo;
                this.redoToolStripButton.Enabled = diagram1.Model.HistoryManager.CanRedo;
                this.deleteToolStripButton.Enabled = (this.diagram1.View.SelectionList.Count > 0);

            }
            else
            {
                this.saveToolStripButton.Enabled = false;
                this.saveAsToolStripButton.Enabled = false;
                this.cutToolStripButton.Enabled = false;
                this.copyToolStripButton.Enabled = false;
                if (this.WindowState != FormWindowState.Minimized)
                    this.pasteToolStripButton.Enabled = false;
                this.undoToolStripButton.Enabled = false;
                this.redoToolStripButton.Enabled = false;
                this.deleteToolStripButton.Enabled = false;
            }
        }

#region MenuTools

        private void CoonectorToolStripDropDownButton_DropDownItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            foreach (ToolStripMenuItem item in CoonectorToolStripDropDownButton.DropDownItems)
            {
                if (item.Checked)
                {
                    item.Checked = false;
                }
            }
            (e.ClickedItem as ToolStripMenuItem).Checked = true;
        }

        private void newToolStripButton_Click(object sender, EventArgs e)
        {
            saveFileDialog1.FilterIndex = 0;
            if (this.SaveChanges)
            {
                DialogResult res = MessageBoxAdv.Show(this, "The diagram or its association has been modified. Save changes?", "Save changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                if (res == DialogResult.Yes)
                {
                    this.saveFileDialog1.FileName = "Diagram";
                    saveFileDialog1.Filter = @"XML file(*.xml)|*.xml|EDD file(*.edd)|*.edd|All files|*.*";
                    saveFileDialog1.Title = "Save File As:";

                    if (this.HasFileName)
                    {
                        this.saveFileDialog1.FileName = this.fileName;
                    }
                    if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
                    {
                        this.fileName = this.saveFileDialog1.FileName;
                        SaveDiagramAs(saveFileDialog1.FileName, saveFileDialog1.FilterIndex);
                        diagram1.Model.Clear();
                        Model model = new Model();
                        model.RenderingStyle.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                        model.LineStyle.LineColor = Color.LightGray;
                        diagram1.Model = model;
                    }
                }
                else if (res == DialogResult.No)
                {
                    diagram1.Model.Clear();
                    Model model = new Model();
                    model.RenderingStyle.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                    model.LineStyle.LineColor = Color.LightGray;
                    diagram1.Model = model;
                }
            }
            else
            {
                diagram1.Model.Clear();
                Model model = new Model();
                model.RenderingStyle.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                model.LineStyle.LineColor = Color.LightGray;
                diagram1.Model = model;
            }
            this.fileName = "";
        }

        private void openToolStripButton_Click(object sender, EventArgs e)
        {
            saveFileDialog1.FilterIndex = 0;
            openFileDialog1.FilterIndex = 0;
            if (this.SaveChanges)
            {
                DialogResult res = MessageBoxAdv.Show(this, "The diagram or its association has been modified. Save changes?", "Save changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                if (res == DialogResult.Yes)
                {
                    this.saveFileDialog1.FileName = "Diagram";
                    saveFileDialog1.Filter = @"XML file(*.xml)|*.xml|EDD file(*.edd)|*.edd|All files|*.*";
                    saveFileDialog1.Title = "Save File As:";

                    if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
                    {
                        this.fileName = this.saveFileDialog1.FileName;
                        SaveDiagramAs(saveFileDialog1.FileName, saveFileDialog1.FilterIndex);
                    }

                    this.openFileDialog1.Filter = @"XML file(*.xml)|*.xml|EDD file(*.edd)|*.edd|All files|*.*";
                    this.openFileDialog1.Title = "Open Diagram";
                    this.openFileDialog1.FileName = "";
                    if (openFileDialog1.ShowDialog() == DialogResult.OK)
                    {
                        if (File.Exists(openFileDialog1.FileName))
                        {
                            OpenDiagramAs(openFileDialog1.FileName, openFileDialog1.FilterIndex);
                        }
                    }
                }
                else if (res == DialogResult.No)
                {
                    this.openFileDialog1.Filter = @"XML file(*.xml)|*.xml|EDD file(*.edd)|*.edd|All files|*.*";
                    this.openFileDialog1.Title = "Open Diagram";
                    this.openFileDialog1.FileName = "";
                    if (openFileDialog1.ShowDialog() == DialogResult.OK)
                    {
                        if (File.Exists(openFileDialog1.FileName))
                        {
                            OpenDiagramAs(openFileDialog1.FileName, openFileDialog1.FilterIndex);
                        }
                    }
                }
            }
            else
            {
                this.openFileDialog1.Filter = @"XML file(*.xml)|*.xml|EDD file(*.edd)|*.edd|All files|*.*";
                this.openFileDialog1.Title = "Open Diagram";
                this.openFileDialog1.FileName = "";
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    if (File.Exists(openFileDialog1.FileName))
                    {
                        OpenDiagramAs(openFileDialog1.FileName, openFileDialog1.FilterIndex);
                    }
                }
            }
            this.fileName = openFileDialog1.FileName;
        }
        private void saveToolStripButton_Click(object sender, EventArgs e)
        {
            saveFileDialog1.FilterIndex = 0;
            if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName))
            {
                saveFileDialog1.Filter = @"XML file(*.xml)|*.xml|EDD file(*.edd)|*.edd";
                if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    switch (saveFileDialog1.FilterIndex)
                    {
                        case 1:
#if NETCORE || NET50 || NET80 || NET60 || NET70 || NET90 || SyncfusionFramework4_6_2 || SyncfusionFramework4_6 || SyncfusionFramework4_5_1 || SyncfusionFramework4_5

                            diagram1.SaveXml(saveFileDialog1.FileName);
                            this.diagram1.Refresh();
#else
                        this.diagram1.SaveSoap(saveFileDialog1.FileName);
#endif
                           
                            break;
                        case 2:
                            diagram1.SaveBinary(saveFileDialog1.FileName);
                            break;
                    }
                    this.fileName = saveFileDialog1.FileName;
                }
            }
            else
            {
                FileInfo fi = new FileInfo(fileName);
                if (fi.Extension == ".edd")
                {
                    diagram1.SaveBinary(fi.FullName);
                }
                else if (fi.Extension == ".xml")
                {
#if NETCORE || NET50 || NET80 || NET60 || NET70 || NET90 || SyncfusionFramework4_6_2 || SyncfusionFramework4_6 || SyncfusionFramework4_5_1 || SyncfusionFramework4_5

                    diagram1.SaveXml(fi.FullName);
                    this.diagram1.Refresh();
#else
                        this.diagram1.SaveSoap(fi.FullName);
#endif
                }
            }
        }

        private void undoToolStripButton_Click(object sender, EventArgs e)
        {
            this.diagram1.Model.HistoryManager.Undo();
        }

        private void redoToolStripButton_Click(object sender, EventArgs e)
        {
            this.diagram1.Model.HistoryManager.Redo();
        }

        private void cutToolStripButton_Click(object sender, EventArgs e)
        {
            diagram1.Controller.Cut();
            this.pasteToolStripButton.Enabled = true;
        }

        private void copyToolStripButton_Click(object sender, EventArgs e)
        {
            diagram1.Controller.Copy();
            this.pasteToolStripButton.Enabled = true;
        }

        private void pasteToolStripButton_Click(object sender, EventArgs e)
        {
            diagram1.Controller.Paste();
            this.pasteToolStripButton.Enabled = false;
        }

        private void deleteToolStripButton_Click(object sender, EventArgs e)
        {
            diagram1.Model.BeginUpdate();
            diagram1.Controller.Delete();
            diagram1.Model.EndUpdate();
        } 
        

        private void resetToolStripButton_Click(object sender, EventArgs e)
        {
            diagram1.View.ZoomToActual();
        }

        private void pageSettingsToolStripButton_Click(object sender, EventArgs e)
        {
            if (this.diagram1 != null && this.diagram1.Model != null)
            {
                Syncfusion.Windows.Forms.Diagram.PageSetupDialog dlgPrintSetup = new Syncfusion.Windows.Forms.Diagram.PageSetupDialog(this.diagram1.View);

                // Made to make values more user friendly 
                dlgPrintSetup.PrintSettings = this.diagram1.View.PageSettings;
                dlgPrintSetup.PrintZoom = this.diagram1.View.PrintZoom;

                if (dlgPrintSetup.ShowDialog() == DialogResult.OK)
                {
                    this.diagram1.View.PageSettings = dlgPrintSetup.PrintSettings;
                    this.diagram1.View.PrintZoom = dlgPrintSetup.PrintZoom;
                    this.diagram1.View.RefreshPageSettings();
                }
            }
        }

        private void previewToolStripButton_Click(object sender, EventArgs e)
        {
            if (this.diagram1 != null)
            {
                PrintDocument printDoc = this.diagram1.CreatePrintDocument();
                PrintPreviewDialog printPreviewDlg = new PrintPreviewDialog();

                printDoc.PrinterSettings.FromPage = 0;
                printDoc.PrinterSettings.ToPage = 0;
                printDoc.PrinterSettings.PrintRange = PrintRange.AllPages;

                printPreviewDlg.Document = printDoc;
                printPreviewDlg.ShowDialog(this);
            }
        }

        private void printToolStripButton_Click(object sender, EventArgs e)
        {
            if (this.diagram1 != null)
            {
                PrintDocument printDoc = this.diagram1.CreatePrintDocument();
                PrintDialog printDlg = new PrintDialog();
                printDlg.Document = printDoc;
                printDlg.UseEXDialog = true;
                printDlg.AllowSomePages = true;

                if (printDlg.ShowDialog(this) == DialogResult.OK)
                {
                    printDoc.PrinterSettings = printDlg.PrinterSettings;
                    printDoc.Print();
                }
            }
        }

        private void showGridToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            if (this.diagram1.View.Grid.Visible)
                this.diagram1.View.Grid.Visible = false;
            else
                this.diagram1.View.Grid.Visible = true;
        }

        private void snapToGridToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (diagram1.View.Grid.SnapToGrid)
                diagram1.View.Grid.SnapToGrid = false;
            else
                diagram1.View.Grid.SnapToGrid = true;
        }

        private void helpToolStripButton_Click(object sender, EventArgs e)
        {
            string targetURL = @"http://help.syncfusion.com/";
            System.Diagnostics.Process.Start(targetURL);
        }
       
        private void saveAsToolStripButton_Click(object sender, EventArgs e)
        {
            saveFileDialog1.FilterIndex = 0;
            this.saveFileDialog1.FileName = "Diagram";
            saveFileDialog1.Filter = @"XML file(*.xml)|*.xml|EDD file(*.edd)|*.edd";
            saveFileDialog1.Title = "Save File As:";

            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                switch (saveFileDialog1.FilterIndex)
                {
                    case 1:
#if NETCORE || NET50 || NET80 || NET60 || NET70 || NET90 || SyncfusionFramework4_6_2 || SyncfusionFramework4_6 || SyncfusionFramework4_5_1 || SyncfusionFramework4_5

                        diagram1.SaveXml(saveFileDialog1.FileName);
                        this.diagram1.Refresh();
#else
                        this.diagram1.SaveSoap(saveFileDialog1.FileName);
#endif
                        break;
                    case 2:
                        diagram1.SaveBinary(saveFileDialog1.FileName);
                       
                        break;
                    default:
                        diagram1.SaveBinary(saveFileDialog1.FileName);
                        break;
                }
            }
        }

        private void pNGToolStripMenuItem_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter = @"W3C Portable Network Graphics(*.png)|*.png";
            saveFileDialog1.Title = "Export Diagram As:";
            this.saveFileDialog1.FileName = "Diagram";
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                ImageFormat imgformat = ImageFormat.Png;
                SaveImage(saveFileDialog1.FileName, imgformat);
            }
            else
            {
                return;
            }
        }

        private void jPEGToolStripMenuItem_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter = @"Joint Photographic Experts Group(*.jpeg)|*.jpeg";
            saveFileDialog1.Title = "Export Diagram As:";
            this.saveFileDialog1.FileName = "Diagram";
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                ImageFormat imgformat = ImageFormat.Jpeg;
                SaveImage(saveFileDialog1.FileName, imgformat);
            }
            else
            {
                return;
            }
        }

        private void gIFToolStripMenuItem_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter = @"Graphics Interchange Format(*.gif)|*.gif";
            saveFileDialog1.Title = "Export Diagram As:";
            this.saveFileDialog1.FileName = "Diagram";
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                ImageFormat imgformat = ImageFormat.Gif;
                SaveImage(saveFileDialog1.FileName, imgformat);

            }
            else
            {
                return;
            }
        }

        private void sVGToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            saveFileDialog1.Filter = @"Scalable Vector Graphics Format(*.svg)|*.svg";
            saveFileDialog1.Title = "Export Diagram As:";
            saveFileDialog1.FileName = "Diagram";
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {

                ToSvg tosvg = new ToSvg();
                // Get Diagram Nodes Bounding Rectangle.
                RectangleF rectBounding = this.diagram1.Model.GetBoundingRect();
                Graphics gfx = tosvg.GetRealGraphics(new Size((int)rectBounding.Width, (int)rectBounding.Height));
                this.diagram1.ExportDiagramToGraphics(gfx);
                tosvg.Save(saveFileDialog1.FileName);

            }
            else
            {
                return;
            }
        }

        private void lineConnectorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetActiveTool(new LineConnectorTool(this.diagram1.Controller));
        }

        private void orthogonalConnectorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetActiveTool(new OrthogonalConnectorTool(this.diagram1.Controller));
        }

        private void polylineConnectorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PolyLineConnectorTool polyTool = new PolyLineConnectorTool(this.diagram1.Controller);
            polyTool.HeadDecorator.DecoratorShape = DecoratorShape.Filled45Arrow;
            polyTool.HeadDecorator.Size = new SizeF(6, 6);
            diagram1.Controller.ActivateTool(polyTool);
        }

        private void bezierConnectorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetActiveTool("BezierTool");
        }

        private void splineConnectorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetActiveTool("SplineTool");
        }

        private void panToolStripButton_Click(object sender, EventArgs e)
        {
            SetActiveTool("PanTool");
        }
        

        private void FillStyleToolStripButton_Click(object sender, EventArgs e)
        {
            if (diagram1.View.SelectionList != null && diagram1.View.SelectionList.Count > 0)
            {
                FillStyleDialog fsd = new FillStyleDialog();
                FillStyle fs = null;
                if (DialogResult.OK == fsd.ShowDialog())
                {
                    diagram1.BeginUpdate();

                    foreach (Node node in this.diagram1.View.SelectionList)
                    {
                        if (node is FilledPath)
                        {
                            fs = (FillStyle)TypeDescriptor.GetProperties(node, false)["FillStyle"].GetValue(node);
                            if (fs != null)
                            {
                                fs.Color = fsd.FillStyle.Color;
                                fs.ForeColor = fsd.FillStyle.ForeColor;
                                fs.ColorAlphaFactor = fsd.FillStyle.ColorAlphaFactor;
                                fs.ForeColorAlphaFactor = fsd.FillStyle.ForeColorAlphaFactor;
                                fs.Type = fsd.FillStyle.Type;
                                fs.GradientAngle = fsd.FillStyle.GradientAngle;
                                fs.GradientCenter = fsd.FillStyle.GradientCenter;
                                fs.PathBrushStyle = fsd.FillStyle.PathBrushStyle;
                                fs.HatchBrushStyle = fsd.FillStyle.HatchBrushStyle;
                                fs.Texture = fsd.FillStyle.Texture;
                                fs.TextureWrapMode = fsd.FillStyle.TextureWrapMode;
                            }
                        }
                        else if (node is ConnectorBase)
                        {
                            ((ConnectorBase)node).LineStyle.LineColor = fsd.FillStyle.Color;
                            ((ConnectorBase)node).HeadDecorator.FillStyle.Color = fsd.FillStyle.Color;
                            ((ConnectorBase)node).HeadDecorator.LineStyle.LineColor = fsd.FillStyle.Color;
                        }
                    }
                    diagram1.EndUpdate();
                }
            }
        }

        private void LineStyleToolStripButton_Click(object sender, EventArgs e)
        {
            if (diagram1.View.SelectionList != null && diagram1.View.SelectionList.Count > 0)
            {
                if (colorDialog1.ShowDialog() == DialogResult.OK)
                {
                    this.diagram1.BeginUpdate();
                    foreach (Node node in diagram1.View.SelectionList)
                    {
                        node.LineStyle.LineColor = colorDialog1.Color;
                    }
                    diagram1.EndUpdate();
                }
            }
        }

        private void shadowToolStripButton_Click(object sender, EventArgs e)
        {
            if (diagram1.View.SelectionList != null && diagram1.View.SelectionList.Count > 0)
            {
                ShadowStyleDialog ssd = new ShadowStyleDialog();
                ShadowStyle fs = null;
                if (DialogResult.OK == ssd.ShowDialog())
                {
                    diagram1.BeginUpdate();
                    foreach (Node node in this.diagram1.View.SelectionList)
                    {
                        if (!(node is ConnectorBase) && !(node is TextNode))
                        {
                            fs = (ShadowStyle)TypeDescriptor.GetProperties(node, false)["ShadowStyle"].GetValue(node);
                            if (fs != null)
                            {
                                fs.Color = ssd.ShadowStyle.Color;
                                fs.ForeColor = ssd.ShadowStyle.ForeColor;
                                fs.ColorAlphaFactor = ssd.ShadowStyle.ColorAlphaFactor;
                                fs.ForeColorAlphaFactor = ssd.ShadowStyle.ForeColorAlphaFactor;
                                fs.PathBrushStyle = ssd.ShadowStyle.PathBrushStyle;
                                fs.OffsetX = ssd.ShadowStyle.OffsetX;
                                fs.OffsetY = ssd.ShadowStyle.OffsetY;
                                fs.Visible = ssd.ShadowStyle.Visible;
                            }
                        }
                    }
                    diagram1.EndUpdate();
                }
            }

        }

        private void shadingToolStripButton_Click(object sender, EventArgs e)
        {
            if (diagram1.View.SelectionList != null && diagram1.View.SelectionList.Count > 0)
            {
                diagram1.BeginUpdate();
                foreach (Node node in diagram1.View.SelectionList)
                {
                    if (node is FilledPath)
                    {
                        FilledPath filledPath = (FilledPath)node;
                        filledPath.EnableShading = !filledPath.EnableShading;
                    }
                }
                diagram1.EndUpdate();
            }
        }

        private void zoomOutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            diagram1.View.ZoomOut();
        }

        private void zoomInToolStripMenuItem_Click(object sender, EventArgs e)
        {
            diagram1.View.ZoomIn();
        }

        private void resetZoomToolStripMenuItem_Click(object sender, EventArgs e)
        {
            diagram1.View.ZoomToActual();
        }

#endregion

#endregion

#region Helper Methods
        //Save diagram as Image
        private void SaveImage(string filename, ImageFormat imageformat)
        {
            Image img = this.diagram1.View.ExportDiagramAsImage(false);
            img.Save(filename, imageformat);
        }

        //Save diagram
        private void SaveDiagramAs(string filename, int index)
        {
            switch (index)
            {
                case 1:
#if NETCORE || NET50 || NET80 || NET60 || NET70 || NET90 || SyncfusionFramework4_6_2 || SyncfusionFramework4_6 || SyncfusionFramework4_5_1 || SyncfusionFramework4_5

                    diagram1.SaveXml(filename);
                    this.diagram1.Refresh();
#else
                        this.diagram1.SaveSoap(filename);
#endif
                    
                    break;
                case 2:
                    diagram1.SaveBinary(filename);
                    break;
                default:
                    diagram1.SaveBinary(filename);
                    break;
            }
        }

        //Open Diagram
        private void OpenDiagramAs(string filename, int index)
        {
            switch (index)
            {
                case 1:
#if NETCORE || NET50 || NET80 || NET60 || NET70 || NET90 || SyncfusionFramework4_6_2 || SyncfusionFramework4_6 || SyncfusionFramework4_5_1 || SyncfusionFramework4_5

                    diagram1.LoadXml(filename);
                    this.diagram1.Refresh();
#else
                        this.diagram1.LoadSoap(filename);
#endif
                    break;
                case 2:
                    diagram1.LoadBinary(filename);
                    break;
                default:
                    diagram1.LoadBinary(filename);
                    break;
            }
        }

        private void SetActiveTool(string toolName)
        {
            this.diagram1.Controller.ActivateTool(toolName);
        }
        private void SetActiveTool(LineBaseTool tool)
        {
            tool.HeadDecorator.DecoratorShape = DecoratorShape.Filled45Arrow;
            tool.HeadDecorator.Size = new SizeF(6, 6);
            this.diagram1.Controller.ActivateTool(tool);
        }
#endregion

    }
}

```
