Class Theme
Represents a class which holds theme info for SfSkinManager.
Implements
Namespace: Syncfusion.SfSkinManager
Assembly: Syncfusion.SfSkinManager.WPF.dll
Syntax
public class Theme : Object, 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:
|
Remarks
Applicable only for ThemeStudio supported specific themes
ScrollBarMode
Gets or Sets the
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:
|
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
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.