[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]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Collapse]Diagrams
    Getting Started
   [Expand]Diagram Control
   [Expand]End-User Interaction
   [Collapse]Diagram Items
     Shapes
     Default Shapes
     Connectors
     Images
     SVG Shapes
     Creating Shapes and Containers Using Shape Templates
     Containers
     Customizing the Appearance of Items
     Managing Items Interaction
   [Expand]Automatic Layout
   [Expand]Data Binding Functionality
    Themes and Styles
    Printing and Exporting
    Saving and Loading Diagrams
   [Expand]Examples
  [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]Sunburst Control
 [Expand]Common Features
  Get More Help
 [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]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Customizing the Appearance of Items

The DiagramControl.CustomDrawItem event allows you to customize the appearance of diagram items or implement a custom painting from scratch.

The CustomDrawItemEventArgs.DefaultDraw method allows you to define which elements of the default painting should be painted. Set the Handled parameter to true to completely disable default painting.

The code snippet below illustrates how to display red circles around connection points.

To add interactive elements to a diagram item, define a custom shape as described in the Creating Shapes and Containers Using Shape Templates lesson. Alternatively, use the DiagramContainer element to combine multiple shapes and specify their protection properties to define which operations are allowed.

To customize the position of connection points, use the DiagramItem.ConnectionPoints property.

Expanded See Also

Is this topic helpful?​​​​​​​