Nevron .NET Vision
Nevron.Diagram.WinForm Namespace / NContextMenuTool Class / DetermineContextMenuElement Method
hit element (can be null)


In This Topic
    DetermineContextMenuElement Method
    In This Topic
    Determines the element for which a context menu must be show
    Syntax
    'Declaration
     
    
    Protected Overridable Function DetermineContextMenuElement( _
       ByVal element As INElement _
    ) As INElement
    'Usage
     
    
    Dim instance As NContextMenuTool
    Dim element As INElement
    Dim value As INElement
     
    value = instance.DetermineContextMenuElement(element)
    protected virtual INElement DetermineContextMenuElement( 
       INElement element
    )

    Parameters

    element
    hit element (can be null)

    Return Value

    element for which to show the menu
    Remarks
    This method will perform the following steps:

    1. If the passed element is null it will return the document.

    2. If the passed element is selected it will return the passed element

    3. If the passed element is not selected it will try to return the first selected ancestor of the element

    4. If the passed element is not selected and none of its ancestor is selected it will select the first layer child in the path (or the element) and return it.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also