Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

DiagramControl - How to create custom shapes with connection points

$
0
0
The Diagram control supports a special language for defining shapes. The main element that contains shape description is ShapeTemplate. This element describes a shape contour and may contain several segments:
- Start. Specifies the start point
- Line. Defines a line with start and end points
- Arc. Defines an arc with start and end points

To specify connection points, use the ShapeTemplate.ConnectionPoints property.
Shapes may contain parameters. Parameters may be used to dynamically calculate an end point, row height and other properties. To specify parameters, use the ShapeTemplate.Parameters property.
To register custom shapes, use the DiagramToolboxRegistrator.RegisterShapes method.
Question Comments

Added By: Piotr Migdalski 1 at: 1/15/2016 7:12:33 AM    

Hello,

Is possible to use in templates images (from resources)?

Added By: Alexander Ch (DevExpress Support) at: 1/18/2016 4:45:20 AM    Hi Piotr,

ShapeTemplates allow you to describe a shape using primitives like Line and Arc. Displaying an image in a shape is a separate feature, which we plan to introduce in future versions.

Thanks,
AlexAdded By: Craig Dunstan at: 4/3/2016 7:05:49 AM    Is there any ability to leverage Visio stencils - either by converting them directly or via an intermediary like SVG?Added By: Alexander Rus (DevExpress Support) at: 4/4/2016 3:00:41 AM    

Hi Craig,
To process your recent post more efficiently, I created a separate ticket on your behalf: T363463: How to use shapes from Visio in DiagramControl

Thanks,
Alexander

Added By: Shuang Xiao at: 5/12/2016 11:16:13 PM    Hi,

Would you please explain further on how to build the xaml like yours? I am wondering this file is created by hand or I can use some funtions to generate the file automatically?
Added By: Alexander Rus (DevExpress Support) at: 5/13/2016 12:41:05 AM    

Hi Shuang,
I've created a separate ticket on your behalf (T378595: Is there a tool to generate shape descriptions for DiagramControl ). It has been placed in our processing queue and will be answered shortly.

Thanks,
Alexander


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>