Table of Contents

Property EditMargin

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

EditMargin

Represents an object that implements IMargin interface and specifies appearance of vertical line drawn over the text and used to mark some limit, for example, of the maximum string length allowed.

public IMargin EditMargin { get; }

Property Value

IMargin

Examples

Here is how to use a EditMargin 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.EditMargin.Position = 60;
        textEditor.EditMargin.Visible = true;
        textEditor.WordWrap = true;
        textEditor.WrapAtMargin = true;
    }
}

Here is how to use a EditMargin 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.EditMargin.Position = 60
        textEditor.EditMargin.Visible = True
        textEditor.WordWrap = True
        textEditor.WrapAtMargin = True
    End Sub
End Class

Remarks

When the WordWrap and WrapAtMargin properties are set to true, the TextEditor control can display a vertical line at the specified character position and optionally wrap text lines at that position.