Share via


IVsUIWpfLoader.ShowModalElement(IVsUIElement, IntPtr, Int32) Method

Definition

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

public:
 int ShowModalElement(Microsoft::VisualStudio::Shell::Interop::IVsUIElement ^ pUIElement, IntPtr hWndParent, [Runtime::InteropServices::Out] int % pResult);
public int ShowModalElement (Microsoft.VisualStudio.Shell.Interop.IVsUIElement pUIElement, IntPtr hWndParent, out int pResult);
abstract member ShowModalElement : Microsoft.VisualStudio.Shell.Interop.IVsUIElement * nativeint * int -> int
Public Function ShowModalElement (pUIElement As IVsUIElement, hWndParent As IntPtr, ByRef pResult As Integer) As Integer

Parameters

pUIElement
IVsUIElement

[in] The visual element to be displayed.

hWndParent
IntPtr

nativeint

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

pResult
Int32

[out] Indicates whether the visual element was displayed.

Returns

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.

Applies to