ThemeManager

StockSharp.Xaml.Charting

Provides automatic themeing of UltrachartSurface via the Theme property.

Properties

AllThemes
public static IList<string> AllThemes { get; }
value = ThemeManager.AllThemes

Gets a list of all available themes

ThemeProvider
public static IThemeProvider ThemeProvider { get; }
value = ThemeManager.ThemeProvider

Gets IThemeProvider instance

Methods

AddTheme
public static void AddTheme(string theme, ResourceDictionary dictionary)
ThemeManager.AddTheme(theme, dictionary)

Add new theme and themeProvider into _theme and ThemeProviders respectively

theme
dictionary
GetTheme
public static string GetTheme(DependencyObject d)
result = ThemeManager.GetTheme(d)

Gets the value of the Theme Attached Property.

d
The dependency object.

Returns: The current Theme.

GetThemeProvider
public static IThemeProvider GetThemeProvider(string theme)
result = ThemeManager.GetThemeProvider(theme)

Gets a IThemeProvider instance for the named

theme
the named

Returns: a IThemeProvider instance

RemoveTheme
public static void RemoveTheme(string theme)
ThemeManager.RemoveTheme(theme)

Add theme by string Key from _theme and appropriate themeProvider from ThemeProviders

theme
SetTheme
public static void SetTheme(DependencyObject d, string value)
ThemeManager.SetTheme(d, value)

Sets the value of the Theme Attached property. For a list of All Themes, see the AllThemes property.

d
The dependency object.
value
The current theme.

Events

ThemeApplied
public static event EventHandler<ThemeAppliedEventArgs> ThemeApplied
ThemeManager.ThemeApplied += handler

Raised when a new theme has been applied to the Ultrachart application.

Fields

ThemeProperty
public static readonly DependencyProperty ThemeProperty
value = ThemeManager.ThemeProperty

Defines the Theme dependency property.