how-to-create-items-with-custom-content-in-diagramcontrol-t395119/CS/DXDiagram.ContentItem/MainWindow.xaml.cs#L30
DiagramStencil stencil = new DiagramStencil("CustomTools", "Content Item Tools");
stencil.RegisterTool(new FactoryItemTool(
"Text",
how-to-use-the-customdrawitem-event-to-draw-custom-icons-inside-diagram-items-t441104/CS/XtraDiagram.CustomDraw/Form1.cs#L26
var stencil = new DiagramStencil("customShapes", "Custom Shapes");
stencil.RegisterTool(new FactoryItemTool("activeTaskShape", () => "Active Task", diagram => new DiagramShapeEx { Content = "Active Task", Status = Status.Active }, new System.Windows.Size(150, 100), false));
stencil.RegisterTool(new FactoryItemTool("inactiveTaskShape", () => "Inactive Task", diagram => new DiagramShapeEx { Content = "Inactive Task", Status = Status.Inactive }, new System.Windows.Size(150, 100), false));
how-to-create-a-diagramshape-descendant-with-editable-and-serializable-properties-t395040/CS/DXDiagram.CustomShapeProperties/MainWindow.xaml.cs#L19
var itemTool = new FactoryItemTool("CustomShape", () => "Custom Shape", diagram => { DiagramShapeEx customShape = new DiagramShapeEx() { Width = 100, Height = 50 }; return customShape; }, new System.Windows.Size(100, 50), false);
stencil.RegisterTool(itemTool);
DevExpress.Diagram.Core.DiagramToolboxRegistrator.RegisterStencil(stencil);
how-to-create-a-diagramshape-descendant-and-serialize-its-properties-t361265/CS/XtraDiagram.CustomShapeProperties/Form1.cs#L40
var itemTool = new FactoryItemTool("CustomShape", () => "Custom Shape", diagram => { DiagramShapeEx customShape = new DiagramShapeEx() { Width = 100, Height = 50 }; return customShape; }, new System.Windows.Size(100, 50), false);
stencil.RegisterTool(itemTool);
DevExpress.Diagram.Core.DiagramToolboxRegistrator.RegisterStencil(stencil);
How-to-create-a-diagram-item-with-labeled-input-and-output-points/CS/InputOutputShapes/MainWindow.xaml.cs#L37
FactoryItemTool myContainerTool = new FactoryItemTool("Decoder", () => "Decoder", d => CreateDecoderContianer());
myStencil.RegisterTool(myContainerTool);
how-to-create-items-with-custom-content-in-diagramcontrol-t395119/VB/DXDiagram.ContentItem/MainWindow.xaml.vb#L32
Dim stencil As New DiagramStencil("CustomTools", "Content Item Tools")
stencil.RegisterTool(New FactoryItemTool("Text", Function() "Text", Function(diagram) New DiagramContentItem() With {.CustomStyleId = "formattedTextContentItem"}, New Size(230, 110), True))
stencil.RegisterTool(New FactoryItemTool("Logo", Function() "Logo", Function(diagram) New DiagramContentItem() With {.CustomStyleId = "devExpressLogoContentItem"}, New Size(230, 80), True))
how-to-use-the-customdrawitem-event-to-draw-custom-icons-inside-diagram-items-t441104/VB/XtraDiagram.CustomDraw/Form1.vb#L28
Dim stencil = New DiagramStencil("customShapes", "Custom Shapes")
stencil.RegisterTool(New FactoryItemTool("activeTaskShape", Function() "Active Task", Function(diagram) New DiagramShapeEx With {.Content = "Active Task", .Status = Status.Active}, New System.Windows.Size(150, 100), False))
stencil.RegisterTool(New FactoryItemTool("inactiveTaskShape", Function() "Inactive Task", Function(diagram) New DiagramShapeEx With {.Content = "Inactive Task", .Status = Status.Inactive}, New System.Windows.Size(150, 100), False))
how-to-create-a-diagramshape-descendant-with-editable-and-serializable-properties-t395040/VB/DXDiagram.CustomShapeProperties/MainWindow.xaml.vb#L16
Dim stencil = New DevExpress.Diagram.Core.DiagramStencil("CustomStencil", "Custom Shapes")
stencil.RegisterTool(New FactoryItemTool("CustomShape", Function() "Custom Shape", Function(diagram) New DiagramShapeEx(), New System.Windows.Size(230, 110), False))
DevExpress.Diagram.Core.DiagramToolboxRegistrator.RegisterStencil(stencil)
how-to-create-a-diagramshape-descendant-and-serialize-its-properties-t361265/VB/XtraDiagram.CustomShapeProperties/Form1.vb#L42
Dim stencil = New DevExpress.Diagram.Core.DiagramStencil("CustomStencil", "Custom Shapes")
stencil.RegisterTool(New FactoryItemTool("CustomShape", Function() "Custom Shape", Function(diagram) New DiagramShapeEx(), New System.Windows.Size(230, 110), False))
DevExpress.Diagram.Core.DiagramToolboxRegistrator.RegisterStencil(stencil)
How-to-create-a-diagram-item-with-labeled-input-and-output-points/VB/InputOutputShapes/MainWindow.xaml.vb#L35
Dim myContainerTool As New FactoryItemTool("Decoder", Function() "Decoder", Function(d) CreateDecoderContianer())
myStencil.RegisterTool(myContainerTool)