Share via


VsShellUtilities.IsDocumentFrameLoaded(IVsWindowFrame) Method

Definition

Determines whether a document frame is loaded.

public static bool IsDocumentFrameLoaded (Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame frame);
static member IsDocumentFrameLoaded : Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame -> bool
Public Function IsDocumentFrameLoaded (frame As IVsWindowFrame) As Boolean

Parameters

frame
IVsWindowFrame

The document frame to check.

Returns

true if the frame is loaded; otherwise, false

Exceptions

Thrown when frame is not a document frame.

Remarks

Some properties of a document frame are not initialized if the frame has not finished loading. Getting the value of those properties before a frame is loaded can cause performance issues since it will force a frame to load earlier than necessary and freezes the UI while the frame is loading.

This method can be used to check if a frame is already loaded before getting any of these frame properties: VSFPROPID_DocData, VSFPROPID_AltDocData, VSFPROPID_DocView, and VSFPROPID_ViewHelper.

Applies to