Property Position
Position
Gets or sets the current position within the control's text content.
[Browsable(false)]
public virtual Point Position { get; set; }
Property Value
Examples
Here is how to use a Position in the C# code:
public partial class MainWindow : Window
{
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var textEditor = new Alternet.Editor.Wpf.TextEditor();
textEditor.LoadFile("myfile.txt");
textEditor.Position = new System.Drawing.Point(0, textEditor.Lines.Count - 1);
textEditor.MakeVisible(textEditor.Position);
}
}
Here is how to use a Position in the Visual Basic code:
Partial Public Class MainWindow
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim textEditor = New Alternet.Editor.Wpf.TextEditor()
textEditor.LoadFile("myfile.txt")
textEditor.Position = New System.Drawing.Point(0, textEditor.Lines.Count - 1)
textEditor.MakeVisible(textEditor.Position)
End Sub
End Class
Remarks
Position specifies the insertion point in column and row coordinates within the text.
Once text content is loaded, the Position control resets its position at the beginning of the text.