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 Rectangle? Bounds { get; }
Property Value
- Rectangle?:
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 int MaxWidth { get; set; }
Property Value
- int:
The quick info popup's maximum width, or
NaN
to indicate no constraint. The default value is1000
.
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 Rectangle PlacementRectangle { get; protected set; }
Property Value
- Rectangle:
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 IUIElement PlacementTarget { get; }
Property Value
- IUIElement:
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 |
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 |
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 |
OnOpened(EventArgs)
Raises the Opened
event.
protected override void OnOpened(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
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 |
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 |
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 |
Open(IEditorView, PlacementMode, IUIElement, Rectangle)
Opens the session around a placement target, attaching to the specified IEditorView.
public void Open(IEditorView view, PlacementMode placement, IUIElement placementTarget, Rectangle 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 | IUIElement | The target IUIElement for placing the quick info. |
placementRectangle | Rectangle | The target-relative Rectangle 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.
Inherited Members
- IntelliPromptSessionBase.GetAllServiceTypes()
- IntelliPromptSessionBase.GetService<T>()
- IntelliPromptSessionBase.GetService(object)
- IntelliPromptSessionBase.RegisterService<T>(T)
- IntelliPromptSessionBase.RegisterService(object, object)
- IntelliPromptSessionBase.UnregisterService<T>()
- IntelliPromptSessionBase.UnregisterService(object)
- IntelliPromptSessionBase.Close(bool)
- IntelliPromptSessionBase.OnServiceAdded(CollectionChangeEventArgs<object>)
- IntelliPromptSessionBase.OnServiceRemoved(CollectionChangeEventArgs<object>)
- IntelliPromptSessionBase.Open(IEditorView, TextRange)
- IntelliPromptSessionBase.GetPopupBounds(PopupControl)
- IntelliPromptSessionBase.CanOpenForReadOnlyTextRanges
- IntelliPromptSessionBase.IsOpen
- IntelliPromptSessionBase.SnapshotRange
- IntelliPromptSessionBase.SyncRoot
- IntelliPromptSessionBase.View
- IntelliPromptSessionBase.Closed
- IntelliPromptSessionBase.Opened
- IntelliPromptSessionBase.ServiceAdded
- IntelliPromptSessionBase.ServiceRemoved
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()