IIntelliPromptSession Interface
Provides the base requirements for an object that represents an IntelliPrompt session.
public interface IIntelliPromptSession : IServiceLocator
Properties
Bounds
Gets the view-relative bounds of the session's open popup, if available.
Rect? Bounds { get; }
Property Value
- Rect?:
The view-relative bounds of the session's open popup, if available.
ClosesOnLostFocus
Returns 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
Gets whether the session is currently open.
SessionType
Gets the IIntelliPromptSessionType that identifies the type of session.
IIntelliPromptSessionType SessionType { get; }
Property Value
- IIntelliPromptSessionType:
The IIntelliPromptSessionType that identifies the type of session.
SnapshotRange
Gets the TextSnapshotRange containing the original TextRange in the ITextSnapshot that triggered the session.
TextSnapshotRange SnapshotRange { get; }
Property Value
- TextSnapshotRange:
The TextSnapshotRange containing the original TextRange in the ITextSnapshot that triggered the session.
Remarks
This member should only be used while the session is open.
View
Gets the IEditorView in which the session is opened.
IEditorView View { get; }
Property Value
- IEditorView:
The IEditorView in which the session is opened.
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.
Opened
Occurs when the session is opened.
Inherited Members
- IServiceLocator.GetAllServiceTypes()
- IServiceLocator.GetService<T>()
- IServiceLocator.GetService(object)
- IServiceLocator.RegisterService<T>(T)
- IServiceLocator.RegisterService(object, object)
- IServiceLocator.UnregisterService<T>()
- IServiceLocator.UnregisterService(object)
- IServiceLocator.SyncRoot
- IServiceLocator.ServiceAdded
- IServiceLocator.ServiceRemoved