IVsUIWpfLoader.ShowModalElement Method

Displays a visual element as a modal dialog in the shell, ensures the right parenting, disables and re-enables the shell, and so on.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaration
Function ShowModalElement ( _
    pUIElement As IVsUIElement, _
    hWndParent As IntPtr, _
    <OutAttribute> ByRef pResult As Integer _
) As Integer
int ShowModalElement(
    IVsUIElement pUIElement,
    IntPtr hWndParent,
    out int pResult
)
int ShowModalElement(
    [InAttribute] IVsUIElement^ pUIElement, 
    [InAttribute] IntPtr hWndParent, 
    [OutAttribute] int% pResult
)
abstract ShowModalElement : 
        pUIElement:IVsUIElement * 
        hWndParent:IntPtr * 
        pResult:int byref -> int
function ShowModalElement(
    pUIElement : IVsUIElement, 
    hWndParent : IntPtr, 
    pResult : int
) : int

Parameters

  • hWndParent
    Type: IntPtr

    [in] A handle to a window that identifies the parent of the visual element.

  • pResult
    Type: Int32%

    [out] Indicates whether the visual element was displayed.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

To display a visual element as a tool window in the shell, create a view object implementing IVsUIElementPane and return from CreateUIElementPane the implementation-specific object obtained from GetUIObject. Pass this IVsUIElementPane view object as the third parameter (punkTool) to CreateToolWindow.

.NET Framework Security

See Also

Reference

IVsUIWpfLoader Interface

Microsoft.VisualStudio.Shell.Interop Namespace