In This Article

QuickInfoSession Class

Represents an IntelliPrompt quick info session.

public class QuickInfoSession : IntelliPromptSessionBase, IEditorDocumentTextChangeEventSink, IEditorViewKeyInputEventSink, IEditorViewSelectionChangeEventSink, IQuickInfoSession, IIntelliPromptSession, IServiceLocator
Inheritance:
object IntelliPromptSessionBase object
Implements:
IEditorDocumentTextChangeEventSink IEditorViewKeyInputEventSink IEditorViewSelectionChangeEventSink IQuickInfoSession IIntelliPromptSession IServiceLocator

Constructors

QuickInfoSession()

Initializes a new instance of the QuickInfoSession class.

public QuickInfoSession()

Properties

Bounds

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

public override 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.

public override bool ClosesOnLostFocus { get; }

Property Value

bool:

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

Content

Gets or sets the content to display in the quick info popup.

public object Content { get; set; }

Property Value

object:

The content to display in the quick info popup.

Context

Gets an object that describes the context in which the quick info popup is displayed.

public object Context { get; set; }

Property Value

object:

An object that describes the context in which the quick info popup is displayed.

ControlKeyDownOpacity

Gets or sets the opacity of the popup while the control key is pressed.

public double ControlKeyDownOpacity { get; set; }

Property Value

double:

The opacity of the popup while the control key is pressed.

Remarks

Set the value to 1.0 to prevent opacity changes when the control key is pressed.

MaxWidth

Gets or sets the quick info popup's maximum width.

public double MaxWidth { get; set; }

Property Value

double:

The quick info popup's maximum width, or NaN to indicate no constraint. The default value is 1000.

Placement

Gets the PlacementMode describing where to place the popup when a PlacementTarget is specified.

public PlacementMode Placement { get; }

Property Value

PlacementMode:

The PlacementMode describing where to place the popup when a PlacementTarget is specified.

PlacementRectangle

Gets the PlacementTarget-relative bounds for where to target the popup when a PlacementTarget is specified.

public Rect PlacementRectangle { get; protected set; }

Property Value

Rect:

The PlacementTarget-relative bounds for where to target the popup when a PlacementTarget is specified.

PlacementTarget

Gets the visual element against which to target the popup when not opening the session for a text range.

public UIElement PlacementTarget { get; }

Property Value

UIElement:

The visual element against which to target the popup when not opening the session for a text range.

See Also

SessionType

Gets the IIntelliPromptSessionType that identifies the type of session.

public override IIntelliPromptSessionType SessionType { get; }

Property Value

IIntelliPromptSessionType:

The IIntelliPromptSessionType that identifies the type of session.

Methods

CreatePopupContent()

Creates an IntelliPromptQuickInfo that is to be displayed in a popup.

protected virtual IntelliPromptQuickInfo CreatePopupContent()

Returns

IntelliPromptQuickInfo:

The control that was created.

NotifyPropertyChanged(string)

Notifies that a property's value has changed.

protected void NotifyPropertyChanged(string name)
Parameter Type Description
name string

The name of the property.

OnClosed(CancelEventArgs)

Raises the Closed event.

protected override void OnClosed(CancelEventArgs e)
Parameter Type Description
e CancelEventArgs

An CancelEventArgs that contains the event data.

OnDocumentTextChanged(SyntaxEditor, EditorSnapshotChangedEventArgs)

Occurs after a text change occurs to an IEditorDocument that uses this language.

protected virtual void OnDocumentTextChanged(SyntaxEditor editor, EditorSnapshotChangedEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument is changed.

e EditorSnapshotChangedEventArgs

The EditorSnapshotChangedEventArgs that contains the event data.

OnDocumentTextChanging(SyntaxEditor, EditorSnapshotChangingEventArgs)

Occurs before a text change occurs to an IEditorDocument that uses this language.

protected virtual void OnDocumentTextChanging(SyntaxEditor editor, EditorSnapshotChangingEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument is changed.

e EditorSnapshotChangingEventArgs

The EditorSnapshotChangingEventArgs that contains the event data.

OnOpened(EventArgs)

Raises the Opened event.

protected override void OnOpened(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnRequestNavigate(RequestNavigateEventArgs)

Raises the RequestNavigate event.

protected virtual void OnRequestNavigate(RequestNavigateEventArgs e)
Parameter Type Description
e RequestNavigateEventArgs

An RequestNavigateEventArgs that contains the event data.

OnViewKeyDown(IEditorView, KeyEventArgs)

Occurs when a key is pressed down while focus is in the specified IEditorView.

protected virtual void OnViewKeyDown(IEditorView view, KeyEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e KeyEventArgs

The KeyEventArgs that contains the event data.

OnViewKeyUp(IEditorView, KeyEventArgs)

Occurs when a key is released while focus is in the specified IEditorView.

protected virtual void OnViewKeyUp(IEditorView view, KeyEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e KeyEventArgs

The KeyEventArgs that contains the event data.

OnViewSelectionChanged(IEditorView, EditorViewSelectionEventArgs)

Occurs when the selection is changed in the specified IEditorView.

protected virtual void OnViewSelectionChanged(IEditorView view, EditorViewSelectionEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e EditorViewSelectionEventArgs

The EditorViewSelectionEventArgs that contains the event data.

Open(IEditorView, PlacementMode, UIElement, Rect)

Opens the session around a placement target, attaching to the specified IEditorView.

public void Open(IEditorView view, PlacementMode placement, UIElement placementTarget, Rect placementRectangle)
Parameter Type Description
view IEditorView

The IEditorView in which the session is opened.

placement PlacementMode

A PlacementMode indicating the mode by which to display the quick info.

placementTarget UIElement

The target UIElement for placing the quick info.

placementRectangle Rect

The target-relative System.Windows.Rect around which to display the quick info.

Reposition()

Notifies the session that it should reposition its user interface.

public override void Reposition()

Events

PropertyChanged

Occurs when a property value is changed.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler

RequestNavigate

Occurs when a hyperlink is clicked that requests navigation.

public event RequestNavigateEventHandler RequestNavigate

Event Type

RequestNavigateEventHandler

Inherited Members