Table of Contents

Property EffectiveVisualTheme

Namespace
Alternet.Editor
Assembly
Alternet.Editor.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 Form1 : Form
{
    private void Form1_Load(object sender, EventArgs e)
    {
        var syntaxEdit1 = new Alternet.Editor.SyntaxEdit(this.components);
        var syntaxEdit2 = new Alternet.Editor.SyntaxEdit(this.components);
        syntaxEdit1.VisualThemeType = Alternet.Editor.VisualThemeType.Dark;
        syntaxEdit1.EffectiveVisualTheme.ApplyToEdit(syntaxEdit2);
    }
}

Here is how to use a EffectiveVisualTheme from 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)
        Dim syntaxEdit2 = New Alternet.Editor.SyntaxEdit(Me.components)
        syntaxEdit1.VisualThemeType = Alternet.Editor.VisualThemeType.Dark
        syntaxEdit1.EffectiveVisualTheme.ApplyToEdit(syntaxEdit2)
    End Sub
End Class

Remarks

Use this property to get the current visual theme, which specifies fonts and colors for all SyntaxEdit visual elements and dialog boxes.

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