menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Theme - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Theme

    Represents a class which holds theme info for SfSkinManager.

    Inheritance
    System.Object
    Theme
    FluentTheme
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.SfSkinManager
    Assembly: Syncfusion.SfSkinManager.WPF.dll
    Syntax
    public class Theme : IDisposable

    Constructors

    Theme()

    Initializes new instance of Theme

    Declaration
    public Theme()

    Theme(String)

    Initializes new instance of Theme

    Declaration
    public Theme(string themeName)
    Parameters
    Type Name Description
    System.String themeName

    The theme name for which theme will be applied for an application.

    Theme(String, String[])

    Initializes a new instance of Theme which allows you to mention the required controls for which themes have to be applied and provides improved performance.

    Declaration
    public Theme(string themeName, string[] controls)
    Parameters
    Type Name Description
    System.String themeName

    The theme name for which theme will be applied for an application.

    System.String[] controls

    The list of controls for which themes have to be applied instead of applying for all controls in application.

    Examples
    <Window.Resources>
       <x:Array Type="sys:String" xmlns:sys="clr-namespace:System;assembly=mscorlib" x:Key="controlList">
            <sys:String>ButtonAdv</sys:String>
       </x:Array>
    </Window.Resources>
    
    <StackPanel syncfusion:SfSkinManager.Theme="{syncfusion:SkinManagerExtension ThemeName=MaterialDark, Controls={StaticResource controlList}}">
        <syncfusion:ButtonAdv Width="100" Grid.Row="0" Content="Testing1" Height="30"   Margin="10"></syncfusion:ButtonAdv>
        <syncfusion:TreeViewAdv Width="100" Grid.Row="2" Margin="10">
            <syncfusion:TreeViewItemAdv Header="Testing3"/>
            <syncfusion:TreeViewItemAdv Header="Testing4"/>
            <syncfusion:TreeViewItemAdv Header="Testing5"/>
        </syncfusion:TreeViewAdv>
    </StackPanel>
    string[] controls = new string[1] { nameof(ButtonAdv) };
    SfSkinManager.SetTheme(this, new Theme("MaterialDark") { Controls = controls });

    Properties

    FocusVisualKind

    Gets or sets the FocusVisualKind property value that denotes the type of keyboard focus appearance of controls where SfSkinManager applies to the control and its child element.

    Declaration
    public FocusVisualKind FocusVisualKind { get; set; }
    Property Value
    Type Description
    FocusVisualKind

    One of the FocusVisualKind enumeration that specifies the keyboard focus appearance of control.

    The default value is Default.

    Fields:

    EnumerationDescription.
    DefaultThe default keyboard focus visual style will be applied while pressing tab key.
    HighVisibilityThe high visibility border for keyboard focus visual style will be applied while pressing tab key
    Remarks

    Applicable only for ThemeStudio supported specific themes

    ScrollBarMode

    Gets or Sets the property value that denotes the type of scrollbar to be displayed in controls where SfSkinManager applies to the control and its child element.

    Declaration
    public ScrollBarMode ScrollBarMode { get; set; }
    Property Value
    Type Description
    ScrollBarMode

    One of the ScrollBarMode enumeration that specifies the scrollbar style to be applied for control.

    The default value is Default.

    Fields:

    EnumerationDescription.
    DefaultThe default scrollbar will be displayed in control
    CompactThe Compact scrollbar will be applied for control where scrollbar in non-interactive mode will be of compact size and original scrollbar size will be displayed on hover/pressed only.
    Remarks

    Applicable only for ThemeStudio supported specific themes

    ThemeName

    Gets or sets the ThemeName value to particular control where SfSkinManager will utilize to apply respective themes for control and its child element in application.

    Declaration
    public string ThemeName { get; set; }
    Property Value
    Type Description
    System.String

    The System.String Theme name. The default value is null.

    Remarks

    Supported Themes

    We can provide theme name in this format: MaterialDark and we can also provide custom theme name in this format: CustomTheme1;BaseThemeName where CustomTheme1 denotes the custom theme name and BaseThemeName denotes the theme name from which it is derived. For example CustomTheme1;MaterialDark.

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved