Nevron Open Vision Documentation
Nevron.Nov.UI Namespace / NCompositeTool Class / ReplaceTool<TTool> Method
The type of the tool to replace.
The replacement tool.
Whether to enable the tool or not.


In This Topic
    ReplaceTool<TTool> Method (NCompositeTool)
    In This Topic
    Replaces the first tool of the given type TTool with the specified tool instance.
    Syntax
    'Declaration
     
    
    Public Function ReplaceTool(Of TTool As NTool)( _
       ByVal newTool As NTool, _
       ByVal enable As System.Boolean _
    ) As System.Boolean
    'Usage
     
    
    Dim instance As NCompositeTool
    Dim newTool As NTool
    Dim enable As System.Boolean
    Dim value As System.Boolean
     
    value = instance.ReplaceTool(Of TTool)(newTool, enable)
    public System.bool ReplaceTool<TTool>( 
       NTool newTool,
       System.bool enable
    )
    where TTool: NTool

    Parameters

    newTool
    The replacement tool.
    enable
    Whether to enable the tool or not.

    Type Parameters

    TTool
    The type of the tool to replace.

    Return Value

    True if a tool was replaced, otherwise - false.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also