ThemeManager
StockSharp.Xaml.Charting
通过主题属性提供 UltrachartSurface 的自动主题.
属性
ThemeProvider
public static IThemeProvider ThemeProvider { get; }
value = ThemeManager.ThemeProvider
Gets IThemeProvider instance
方法
AddTheme
public static void AddTheme(string theme, ResourceDictionary dictionary)
ThemeManager.AddTheme(theme, dictionary)
将新主题和themeProvider分别添加到_theme和ThemeProviders中
- theme
- dictionary
GetTheme
public static string GetTheme(DependencyObject d)
result = ThemeManager.GetTheme(d)
获得主题附加属性的值。
- d
- 依赖对象 。
返回值: 现主题 。
GetThemeProvider
public static IThemeProvider GetThemeProvider(string theme)
result = ThemeManager.GetThemeProvider(theme)
获得命名的 IThemeProvider 实例
- theme
- 名称
返回值: a IThemeProvider 例
RemoveTheme
public static void RemoveTheme(string theme)
ThemeManager.RemoveTheme(theme)
按字符串键从 _theme 添加主题, 并相应从 ThemeProviders 添加 themeProvider
- theme
SetTheme
public static void SetTheme(DependencyObject d, string value)
ThemeManager.SetTheme(d, value)
设置主题附加属性的值。关于所有主题的列表,请参见 *##AllThemes #%属性。
- d
- 依赖对象 。
- value
- 现主题.
事件
ThemeApplied
public static event EventHandler<ThemeAppliedEventArgs> ThemeApplied
ThemeManager.ThemeApplied += handler
当Ultrachart应用了一个新的主题时, 被提出.
字段
ThemeProperty
public static readonly DependencyProperty ThemeProperty
value = ThemeManager.ThemeProperty
定义主题依赖属性。