In This Article

IntelliPromptCodeSnippetSelector Class

Represents a default implementation of an IntelliPrompt code snippet selector.

public class IntelliPromptCodeSnippetSelector : UIControl, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable
Inheritance:
object MarshalByRefObject Component Control ScrollableControl UIControl object
Implements:
IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable

Constructors

IntelliPromptCodeSnippetSelector(ICodeSnippetSelectionSession)

Initializes an instance of the IntelliPromptCodeSnippetSelector class.

public IntelliPromptCodeSnippetSelector(ICodeSnippetSelectionSession session)
Parameter Type Description
session ICodeSnippetSelectionSession

The ICodeSnippetSelectionSession for which the popup is displayed.

Properties

CurrentInputTextHorizontalOffset

Gets the horizontal offset of the current input text.

public int CurrentInputTextHorizontalOffset { get; }

Property Value

int:

The horizontal offset of the current input text.

Session

Gets the ICodeSnippetSelectionSession for which the popup is displayed.

public ICodeSnippetSelectionSession Session { get; }

Property Value

ICodeSnippetSelectionSession:

The ICodeSnippetSelectionSession for which the popup is displayed.

Methods

DpiScaleChanged(SizeF)

Called when the DPI-based scale factor of the element changes.

public override void DpiScaleChanged(SizeF scaleFactor)
Parameter Type Description
scaleFactor SizeF

The new scale factor where Width is applied to the x-axis, and Height is applied to the y-axis.

See Also

GetPreferredSize(Size)

Returns the preferred size.

public override Size GetPreferredSize(Size proposedSize)
Parameter Type Description
proposedSize Size

The proposed size.

Returns

Size:

The preferred size.

MeasureOverride(Graphics, Size)

Measures the size in layout required for child elements and determines a size for the element itself.

protected override Size MeasureOverride(Graphics g, Size availableSize)
Parameter Type Description
g Graphics

The Graphics object to use for measurement.

availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

Remarks

Element authors should override this method, call Measure on each visible child element and determine the total size required.

OnGotFocus(EventArgs)

Raises the GotFocus event.

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

An EventArgs that contains the event data.

OnMouseDown(MouseEventArgs)

Raises the MouseDown event.

protected override void OnMouseDown(MouseEventArgs e)
Parameter Type Description
e MouseEventArgs

An MouseEventArgs that contains the event data.

OnRender(PaintEventArgs)

Raises the Paint event.

protected override void OnRender(PaintEventArgs e)
Parameter Type Description
e PaintEventArgs

An PaintEventArgs that contains the event data.

OnSizeChanged(EventArgs)

Occurs when the control is resized.

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

The EventArgs that contains the event data.

Inherited Members