Table of Contents

Property EffectiveVisualTheme

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

EffectiveVisualTheme

Gets current visual theme.

[Browsable(false)]
public IVisualTheme EffectiveVisualTheme { get; }

Property Value

IVisualTheme

Examples

Here is how to use a EffectiveVisualTheme from the C# code:

public partial class MainWindow : Window
{
    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        var textEditor1 = new Alternet.Editor.Wpf.TextEditor();
        var textEditor2 = new Alternet.Editor.Wpf.TextEditor();
        textEditor1.VisualThemeType = Alternet.Editor.Wpf.VisualThemeType.Dark;
        textEditor1.EffectiveVisualTheme.ApplyToEdit(textEditor2);
    }
}

Here is how to use a EffectiveVisualTheme from the Visual Basic code:

Partial Public Class MainWindow

    Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim textEditor1 = New Alternet.Editor.Wpf.TextEditor()
        Dim textEditor2 = New Alternet.Editor.Wpf.TextEditor()
        textEditor1.VisualThemeType = Alternet.Editor.Wpf.VisualThemeType.Dark
        textEditor1.EffectiveVisualTheme.ApplyToEdit(textEditor2)
    End Sub
End Class

Remarks

Use this property to get the current visual theme that specifies fonts and colors for all TextEditor visual elements and dialog boxes.

In most cases, this property will return one of the predefined themes like LightVisualTheme or DarkVisualTheme.