In This Article

IIntelliPromptSession Interface

Provides the base requirements for an object that represents an IntelliPrompt session.

public interface IIntelliPromptSession : IServiceLocator

Properties

Bounds

The view-relative bounds of the session's open popup, if available.

Rectangle? Bounds { get; }

Property Value

Rectangle?

ClosesOnLostFocus

Indicates whether this session auto-closes when the editor or any IntelliPrompt popups lose focus.

bool ClosesOnLostFocus { get; }

Property Value

bool:

true if this session auto-closes when the editor or any IntelliPrompt popups lose focus; otherwise, false.

IsOpen

Indicates whether the session is currently open.

bool IsOpen { get; }

Property Value

bool:

true if the session is currently open; otherwise, false.

SessionType

The IIntelliPromptSessionType that identifies the type of session.

IIntelliPromptSessionType SessionType { get; }

Property Value

IIntelliPromptSessionType

SnapshotRange

The TextSnapshotRange containing the original TextRange in the ITextSnapshot that triggered the session.

TextSnapshotRange? SnapshotRange { get; }

Property Value

TextSnapshotRange?

Remarks

This member should only be used while the session is open.

View

The IEditorView in which the session is opened.

IEditorView? View { get; }

Property Value

IEditorView

Remarks

This member should only be used while the session is open.

Methods

Close(bool)

Closes the session.

void Close(bool cancelled)
Parameter Type Description
cancelled bool

Whether the session was closed due to a cancellation.

Open(IEditorView, TextRange?)

Opens the session, attaching to the specified IEditorView.

void Open(IEditorView view, TextRange? textRange)
Parameter Type Description
view IEditorView

The IEditorView in which the session is opened.

textRange TextRange?

The source TextRange in the view's current ITextSnapshot.

Reposition()

Notifies the session that it should reposition its user interface.

void Reposition()

Events

Closed

Occurs when the session is closed, with the Cancel flag on the event arguments indicating whether the close was due to a cancellation.

event EventHandler<CancelEventArgs> Closed

Event Type

EventHandler<CancelEventArgs>

Opened

Occurs when the session is opened.

event EventHandler Opened

Event Type

EventHandler

Inherited Members

Extension Methods