Create a Feature-Rich WPF Diagramming App in 2 Minutes
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (179).NET Core  (28).NET MAUI  (214)Angular  (110)ASP.NET  (51)ASP.NET Core  (83)ASP.NET MVC  (90)Azure  (41)Black Friday Deal  (1)Blazor  (226)BoldSign  (15)DocIO  (24)Essential JS 2  (109)Essential Studio  (200)File Formats  (69)Flutter  (133)JavaScript  (226)Microsoft  (120)PDF  (81)Python  (1)React  (105)Streamlit  (1)Succinctly series  (131)Syncfusion  (943)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (45)Webinar  (52)Windows Forms  (61)WinUI  (71)WPF  (163)Xamarin  (160)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (9)Business intelligence  (55)Button  (4)C#  (158)Chart  (140)Chart of the week  (54)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (70)Development  (659)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (14)Excel  (43)Extensions  (23)File Manager  (7)Gantt  (19)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (512)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (4)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (14)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (113)UI  (393)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (615)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Create a Feature-Rich WPF Diagramming App in 2 Minutes

Create a Feature-Rich WPF Diagramming App in 2 Minutes

Are you struggling to convey a workflow or finding it hard to create an organizational chart? Don’t worry, our Diagram control makes it easier and you can get started in no time. The Syncfusion WPF Diagram control is a powerful, extensible, and feature-rich library for creating and editing interactive diagrams. It is a one-stop solution for all your diagram needs, such as annotations, grouping, localization, printing, exporting, and more.

In this blog post, we are going to learn how to create a feature-rich diagramming application with the WPF Diagram control in two minutes.


Step 1: Design application layout.

In the MainWindow.xaml file, split the default grid into two rows and two columns before adding the Syncfusion controls.

Refer to the following code example.

   <RowDefinition Height="Auto"/>
   <RowDefinition Height="*"/>

   <ColumnDefinition Width="Auto" />
   <ColumnDefinition Width="8*" />

Step 2: Add and configure the diagram ribbon from the toolbox.

The diagram ribbon control is a user interface that hosts a quick access toolbar, an application menu, and tabs to provide the most common features and settings for the WPF Diagram.

So let’s, add the SfDiagramRibbon control to the application by dragging it from the toolbox to the designer view. Once dropped, set the Grid.Row to 0, Grid.Column to 0, and Grid.ColumnSpan to 2 in your XAML file.

Refer to the following code example.

<syncfusion:SfDiagramRibbon Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" />

Note: For more details, refer to the Diagram Ribbon in WPF Diagram documentation.

Step 3: Add Diagram Canvas from the toolbox.

Now, add the SfDiagram control to the application by dragging it from the toolbox to the designer view. Once dropped, set the Name to Diagram, Grid.Row to 1, Grid.Column to 1, and the Nodes, Connectors, and Groups properties with the new instances of NodesCollection, ConnectorCollection, and GroupCollection respectively.

Bind the DataContext of the SfDiagramRibbon to the ElementName of the Diagram control.

Refer to the following code example.

<syncfusion:SfDiagramRibbon Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" DataContext="{Binding ElementName=Diagram}"/>
 <syncfusion:SfDiagram x:Name="Diagram" Grid.Column="1" Grid.Row="1">
      <syncfusion:SnapSettings SnapConstraints="ShowLines"/>
      <syncfusion:Ruler Orientation="Vertical"/>

Step 4: Add resources and style.

To use WPF Diagram control’s built-in shapes, you need to add “/Syncfusion.SfDiagram.Wpf;component/Resources/BasicShapes.xaml” into windows resource dictionary. Also, add style for node in the same resource dictionary and set ShapeStyle property with value for Fill, Stroke, StrokeThickness and Stretch.

     <ResourceDictionary Source="/Syncfusion.SfDiagram.WPF;component/Resources/BasicShapes.xaml"/>
   <Style TargetType="syncfusion:Node">
      <Setter Property="ShapeStyle">
            <Style TargetType="Path">
               <Setter Property="Fill" Value="#FF5B9BD5 "/>
               <Setter Property="Stroke" Value="#FFC8C8C8 "/>
               <Setter Property="StrokeThickness" Value="1"/>
               <Setter Property="Stretch" Value="Fill"/>

Step 5: Add a gallery of reusable shapes.

The WPF Diagram control provides a gallery of reusable symbols and diagram elements called the Stencil. You can drag the symbols and elements onto the diagram canvas any number of times.

The following code illustrates how to create a stencil using our built-in basic shapes. You can add any of our built-in shapes or custom shapes to the Stencil.

<syncfusion:Stencil x:Name="Stencil" Width="230" Grid.Column="0" Grid.Row="1" Title="Shapes">
        <!--Specify the basic shapes category with title and resource key-->
            <syncfusion:StencilCategory Title="Basic Shapes" Keys="{StaticResource BasicShapes}"/>

Note: Refer to the Stencil in WPF Diagram documentation for how to add custom shapes and shape categories, and how to customize the stencil appearance.

Step 6: Apply a theme to your application (optional).

The SfSkinManager helps you apply various built-in themes to the Syncfusion and Framework controls. Use those themes to get a rich user-interface experience.

You can add the Syncfusion themes libraries from Here, we are going to apply the Fluent light theme to the diagramming app.

Refer to the following code example.

using Syncfusion.SfSkinManager;
/// <summary>
/// Interaction logic for MainWindow.xaml.
/// </summary>
public partial class MainWindow : Window
  public MainWindow()
     SfSkinManager.SetTheme(this, new Theme() { ThemeName = "FluentLight" });

Note: Refer to the Themes in WPF Diagram documentation for more details about our built-in themes and how to add them to your application.

Step 7: Run your first diagramming application and create diagrams.

Now, run your first diagramming application and create desired diagrams with it.

Refer to the following YouTube video.


For more details, download the source project from the WPF Diagramming Application demo.


In this blog post, we have seen how to create a feature-rich diagramming application within two minutes using the Syncfusion WPF Diagram library. With this, you can create an organization chart creator, a flow chart creator, a network diagram, a logic circuit diagram, and more. The WPF Diagram library supports even more rich, interactive features than those demonstrated here, like automatic layouts, and data binding from different data sources. To explore available features in more depth, refer to our WPF Diagram documentation.

Diagrams speak louder than words. So, illustrate your ideas with the help of our WPF Diagram control and leave your feedback in the comments section of this blog post!

If you’re already a Syncfusion user, you can download the product setup from our website. Otherwise, you can download a free, 30-day trial.

You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Related Blogs


Share this post:

Comments (2)

The Diagram product has many capabilities not illustrated in the apps that are published here. The app that shows these capabilities the best is one I found only by a search on Google: an entity-relationship diagramming app that was “somehwhere” on the syncfusion site.

What makes that app special: the user can “add” information to the “entity” (fields, etc.). There are many uses for this type of capability in business apps. The variety of relationships that can be created also is useful: ideas can loop back on themselves, etc.

Updating that App would highlight these advanced capabilities that might give users ideas beyond the current selection of Diagram apps.

Hi Henry,

Thanks for your valuable feedback.
Yes, using our diagram control, the user can achieve more diagram types and functionalities. Here, in this app, we have focused on how to create a simple diagram builder app.
We have future plan to publish more diagramming apps with features specific to a particular diagram type. Kindly follow us to get more diagramming related updates.


Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed