ThemeManager
StockSharp.Xaml.Charting
Обеспечивает автоматическое оформление темы UltrachartSurface через свойство Theme.
Свойства
AllThemes
public static IList<string> AllThemes { get; }
value = ThemeManager.AllThemes
Получить список всех доступных тем
ThemeProvider
public static IThemeProvider ThemeProvider { get; }
value = ThemeManager.ThemeProvider
Получает 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 instance
RemoveTheme
public static void RemoveTheme(string theme)
ThemeManager.RemoveTheme(theme)
Добавить тему строкой Ключ от _theme и соответствующий themeProvider от ThemeProviders
- 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
Определяет свойство зависимости темы.