Table of Contents

Method DisplayGotoLineDialog

Namespace
Alternet.Editor
Assembly
Alternet.Editor.MAUI.v10.dll

DisplayGotoLineDialog(SyntaxEdit, DisplayPromptAsyncDelegate?)

Displays a dialog prompting the user to enter a line number and navigates the editor to the specified line.

public static DialogResult DisplayGotoLineDialog(SyntaxEdit editor, DisplayPromptAsyncDelegate? action = null)

Parameters

editor SyntaxEdit

The SyntaxEdit instance where the line navigation will occur.

action DisplayPromptAsyncDelegate

An optional delegate for displaying the prompt asynchronously. If null, the default prompt mechanism is used.

Returns

DialogResult

A DialogResult indicating the result of the dialog interaction. Returns Cancel if the parent page of the editor is not found.

Remarks

The dialog allows the user to input a line number within the valid range of lines in the editor. If the input is invalid or outside the range, the line number is adjusted to fit within the valid range. The editor's view is updated to center on the specified line.