Property Lines
Lines
Represents the object that implements ITextStrings
interface containing collection of strings determining text source content.
[Browsable(false)]
public virtual ITextStrings Lines { get; set; }
Property Value
Examples
Here is how to use a Lines in the C# code:
using System;
using System.Windows;
using Alternet.Editor.Wpf;
public partial class MainWindow : Window
{
private TextSource textSource;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var textEdit1 = new TextEditor();
textSource = new TextSource();
for (int i = 0; i < 100; i++)
{
textSource.Lines.Add(string.Format("Line No: {0}", i));
}
textEdit1.Source = this.textSource;
}
}
Here is how to use a Lines in the Visual Basic code:
Imports System
Imports System.Windows
Imports Alternet.Editor.Wpf
Partial Public Class MainWindow
Inherits Window
Private textSource As TextSource
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim textEdit1 = New TextEditor()
textSource = New TextSource()
For i As Integer = 0 To 100 - 1
textSource.Lines.Add(String.Format("Line No: {0}", i))
Next
textEdit1.Source = Me.textSource
End Sub
End Class
Remarks
Each item in the list represents a text line of the text stored by this TextSource object.