FactoryItemTool Class
Allows you to create custom item tools.
Namespace: DevExpress.Diagram.Core
Assembly: DevExpress.Diagram.v24.2.Core.dll
Declaration
Remarks
The example below illustrates how to create a custom rectangle and use it as the Ribbon’s Rectangle tool.
diagramControl1.OptionsBehavior.RectangleTool = new FactoryItemTool("CustomRect", () => "CustomRect",
diagram => new DiagramShape() {
Shape = BasicShapes.Rectangle,
ConnectionPoints = new PointCollection(new List<PointFloat>() { new PointFloat(0.5F, 0.5F) })},
BasicShapes.Rectangle.DefaultSize, BasicShapes.Rectangle.IsQuick);
To learn more, see the following examples:
- Winforms: How to: Create a DiagramShape Descendant and Serialize Its Properties
- WPF: How to: Create a DiagramShape Descendant and Serialize Its Properties
Inheritance
Object
DevExpress.Utils.ImmutableObject
DiagramTool
DevExpress.Diagram.Core.ItemTool
FactoryItemTool
See Also