Table of Contents

Property LineTerminator

Namespace
Alternet.Editor.Wpf
Assembly
Alternet.Editor.Wpf.v9.dll

LineTerminator

Gets or sets a string value that terminates line.

[Browsable(false)]
public virtual string LineTerminator { get; set; }

Property Value

string

Examples

Here is how to use a LineTerminator 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();
        textSource.LoadFile("myfile.txt");

        textSource.LineTerminator = "\u000A";
        textEdit1.Source = this.textSource;
        textSource.SaveFile("myfile.txt");
    }
}

Here is how to use a LineTerminator in the Visual Basic code:

Imports System
Imports System.Windows
Imports Alternet.Editor.Wpf
Imports Microsoft.VisualBasic

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()
        textSource.LoadFile("myfile.txt")

        textSource.LineTerminator = vbLf
        textEdit1.Source = Me.textSource
        textSource.SaveFile("myfile.txt")
    End Sub
End Class

Remarks

LineTerminator specifies characters (such as CR and LF) that are automatically inserted into the text to separate text lines.