Skip to main content
A newer version of this page is available. .

FactoryItemTool Class

Allows you to create custom item tools.

Namespace: DevExpress.Diagram.Core

Assembly: DevExpress.Diagram.v18.1.Core.dll

Declaration

public class FactoryItemTool :
    ItemTool

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:

The following code snippets (auto-collected from DevExpress Examples) contain references to the FactoryItemTool class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Object
DevExpress.Utils.ImmutableObject
DiagramTool
DevExpress.Diagram.Core.ItemTool
FactoryItemTool
See Also