Table of Contents

Property Strings

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

Strings

Gets or sets text source content in the form of string array.

[TypeConverter(typeof(CollectionConverter))]
public virtual string[] Strings { get; set; }

Property Value

string[]

Examples

Here is how to use a Strings 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.Strings = new string[] { "first string", "second string", "third string" };

        textEdit1.Source = this.textSource;
    }
}

Here is how to use a Strings 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()
        textSource.Strings = New String() {"first string", "second string", "third string"}

        textEdit1.Source = Me.textSource
    End Sub
End Class

Remarks

Each item in the list represents an individual text line stored by the TextSource object