Table of Contents

Property LineStyles



Represents an object that implements IEditLineStyles interface holding collection of IEditLineStyle objects each of them determines particular style of the line in the control.

public IEditLineStyles LineStyles { get; }

Property Value



Here is how to use a LineStyles in the C# code:

using System.Drawing;

public partial class MainWindow : Window
    private void Window_Loaded(object sender, RoutedEventArgs e)
        var textEditor = new Alternet.Editor.Wpf.TextEditor();
        textEditor.LineStyles.Add(new EditLineStyle()
            BackColor = Color.White,
            ForeColor = Color.FromArgb(171, 97, 107),
            Options = LineStyleOptions.BeyondEol | LineStyleOptions.InvertColors,
            ImageIndex = 11,

        textEditor.Source.LineStyles.ToggleLineStyle(1, 0, 1);

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

Imports System.Drawing

Partial Public Class MainWindow

    Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim textEditor = New Alternet.Editor.Wpf.TextEditor()
        textEditor.LineStyles.Add(New EditLineStyle() With {
            .BackColor = Color.White,
            .ForeColor = Color.FromArgb(171, 97, 107),
            .Options = LineStyleOptions.BeyondEol Or LineStyleOptions.InvertColors,
            .ImageIndex = 11

        textEditor.Source.LineStyles.ToggleLineStyle(1, 0, 1)
    End Sub
End Class


Each element in the list represents a IEditLineStyle object, which can be applied to the text lines in the TextEditor control. IEditLineStyle specifies the appearance of the text it's associated with, such as the background and foreground color of the text or an image drawn in theTextEditor control's gutter area.