ThemeManager
StockSharp.Xaml.Charting
Fornece tema automático de UltrachartSurface através da propriedade Tema.
Propriedades
AllThemes
public static IList<string> AllThemes { get; }
value = ThemeManager.AllThemes
Obtém uma lista de todos os temas disponíveis
ThemeProvider
public static IThemeProvider ThemeProvider { get; }
value = ThemeManager.ThemeProvider
Obtém IThemeProvider exemplo
Métodos
AddTheme
public static void AddTheme(string theme, ResourceDictionary dictionary)
ThemeManager.AddTheme(theme, dictionary)
Adicionar novo tema e themeProvider @ _theme e ThemeProviders, respectivamente
- theme
- dictionary
GetTheme
public static string GetTheme(DependencyObject d)
result = ThemeManager.GetTheme(d)
Obtém o valor da propriedade anexada ao tema.
- d
- O objeto de dependência.
Retorna: O tema atual.
GetThemeProvider
public static IThemeProvider GetThemeProvider(string theme)
result = ThemeManager.GetThemeProvider(theme)
Obtém uma instância IThemeProvider para o nome
- theme
- o nome
Retorna: a IThemeProvider exemplo
RemoveTheme
public static void RemoveTheme(string theme)
ThemeManager.RemoveTheme(theme)
Adicionar tema por texto Chave de _theme e apropriado themeProvider de ThemeProviders
- theme
SetTheme
public static void SetTheme(DependencyObject d, string value)
ThemeManager.SetTheme(d, value)
Define o valor da propriedade Anexada ao Tema. Para uma lista de Todos os Temas, veja a propriedade AllThemes.
- d
- O objeto de dependência.
- value
- O tema actual.
Eventos
ThemeApplied
public static event EventHandler<ThemeAppliedEventArgs> ThemeApplied
ThemeManager.ThemeApplied += handler
Criado quando um novo tema foi aplicado ao aplicativo Ultrachart.
Campos
ThemeProperty
public static readonly DependencyProperty ThemeProperty
value = ThemeManager.ThemeProperty
Define a propriedade de dependência do tema.