Table of Contents

Property LineStyles

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

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.

[TypeConverter("Alternet.Design.LineStylesConverter, Alternet.Editor.Design.v9")]
public virtual IEditLineStyles LineStyles { get; set; }

Property Value

IEditLineStyles

Examples

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

public partial class Form1 : Form
{
    private void Form1_Load(object sender, EventArgs e)
    {
        var syntaxEdit1 = new Alternet.Editor.SyntaxEdit(this.components);
        syntaxEdit1.LineStyles.Add(new EditLineStyle()
        {
            BackColor = Color.White,
            ForeColor = Color.FromArgb(171, 97, 107),
            Options = LineStyleOptions.BeyondEol | LineStyleOptions.InvertColors,
            ImageIndex = 11,
        });

        syntaxEdit1.Source.LineStyles.ToggleLineStyle(1, 0, 1);
    }
}

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

Partial Public Class Form1
    Inherits Form

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim syntaxEdit1 = New Alternet.Editor.SyntaxEdit(Me.components)
        syntaxEdit1.LineStyles.Add(New EditLineStyle() With {
            .BackColor = Color.White,
            .ForeColor = Color.FromArgb(171, 97, 107),
            .Options = LineStyleOptions.BeyondEol Or LineStyleOptions.InvertColors,
            .ImageIndex = 11
        })

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

Remarks

Each element in the list represents a IEditLineStyle object, which can be applied to the text lines in the SyntaxEdit 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 theSyntaxEdit control's gutter area.