Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Collapse]Diagrams
    Getting Started
   [Expand]Diagram Designer
    Diagram Control
   [Expand]End-User Interaction
   [Expand]Diagram Items
   [Expand]Automatic Layout
   [Expand]Data Binding Functionality
    Themes and Styles
    Printing and Exporting
    Saving and Loading Diagrams
   [Collapse]Examples
     How to: Handle DiagramControl Events to Save Diagrams to a Database instead of a File System
     How to: Create Custom Shapes with Connection Points
     How to: Create Custom Shapes with Connection Points Using XAML
     How to: Use Custom Graph Layout Algorithms to Arrange Shapes in DiagramControl
     How to: Use the CustomDrawItem Event to Draw Custom Icons Inside Diagram Items
     How to: Create a DiagramShape Descendant and Serialize Its Properties
     How to: Create Custom Diagram Containers and Register them in the Toolbox and Ribbon Gallery
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Create Custom Shapes with Connection Points Using XAML

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T381372.

This example demonstrates how to describe custom shapes using the XAML markup instead of XML.

Note

The PresentationCore library used in this example affects the DPI awareness of WinForms applications (see T346466 - DiagramControl disables DPI scaling for the entire application). Use this approach only if your application is not DPI aware or the PresentationCore library is pre-loaded in the Program.Main method as follows:

In other cases, it is preferred to describe shapes using XML, as demonstrated in the following example: How to: Create Custom Shapes with Connection Points.

How would you rate this topic?​​​​​​​