• HOME
  • PRODUCTS
  • DEMOS
  • BUY
  • BLOG
  • FORUM
  • DOCUMENTATION
  • ABOUT
  • FREE EVALUATION
Search Results for

    Show / Hide Table of Contents

    EffectiveVisualTheme Property

    EffectiveVisualTheme

    Gets current visual theme.

    Declaration
    [Browsable(false)]
    public IVisualTheme EffectiveVisualTheme { get; }
    Property Value
    Type Description
    IVisualTheme
    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.

    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
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF