IVsUIWpfLoader::ShowModalElement Method (IVsUIElement^, IntPtr, Int32)

 

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)

int ShowModalElement(
	IVsUIElement^ pUIElement,
	IntPtr hWndParent,
	[OutAttribute] int% pResult
)

Parameters

pUIElement
Type: Microsoft.VisualStudio.Shell.Interop::IVsUIElement^

[in] The visual element to be displayed.

hWndParent
Type: System::IntPtr

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

pResult
Type: System::Int32

[out] Indicates whether the visual element was displayed.

Return Value

Type: System::Int32

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

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.

Return to top
Show: