Changing the Viewer and Designer Theme
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.The WPF viewer and designer follow a global UI theme — an appearance (
Read and apply the theme. The current values come from
How it works. Both the viewer and the designer subscribe to the global theme, so one call restyles the entire Stimulsoft UI to match your application.
Auto/Light/Dark) and an accent color — that you can read and change at run time.Read and apply the theme. The current values come from
StiUXTheme; ApplyNewTheme switches them live:// Read the current appearance
switch (StiUXTheme.Appearance)
{
case StiThemeAppearance.Auto: comboBoxAppearance.SelectedIndex = 0; break;
case StiThemeAppearance.Light: comboBoxAppearance.SelectedIndex = 1; break;
case StiThemeAppearance.Dark: comboBoxAppearance.SelectedIndex = 2; break;
}
// Apply a new appearance and accent color
StiUXTheme.ApplyNewTheme(StiThemeAppearance.Dark, StiThemeAccentColor.Blue);StiUXTheme.Appearance—Auto,LightorDark;Autofollows the operating-system setting.StiUXTheme.AccentColor— Blue, Violet, Carmine, Teal … the highlight color of the UI.ApplyNewTheme(appearance, accent)— repaints the viewer and designer immediately.
How it works. Both the viewer and the designer subscribe to the global theme, so one call restyles the entire Stimulsoft UI to match your application.