FactoryItemTool(String, Func<String>, Func<IDiagramControl, ItemUsage, IDiagramItem>, Nullable<Size>, Boolean) Constructor

Initializes a new instance of the FactoryItemTool class.

Namespace: DevExpress.Diagram.Core

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


public FactoryItemTool(
    string id,
    Func<string> getName,
    Func<IDiagramControl, ItemUsage, IDiagramItem> createItem,
    Size? defaultSize = default(Size? ),
    bool isQuick = false
Public Sub New(
    id As String,
    getName As Func(Of String),
    createItem As Func(Of IDiagramControl, ItemUsage, IDiagramItem),
    defaultSize As Size? = Nothing,
    isQuick As Boolean = False


Name Type Description
id String

A System.String value that is the tool's identifier.

getName Func<String>

A function that returns the name of the tool.

createItem Func<DevExpress.Diagram.Core.IDiagramControl, ItemUsage, DevExpress.Diagram.Core.IDiagramItem>

A function that creates the item.

Optional Parameters

Name Type Default Description
defaultSize Nullable<Size>


The default item size.

isQuick Boolean


true to display the item in the Quick Shapes category of the Shapes Panel; otherwise, false.

See Also