TerminalTheme

StockSharp.Broker.Maui.Terminal.Services

Applies the user's theme choice (0 = System, 1 = Light, 2 = Dark) to the app. Two things have to move together: UserAppTheme drives the app-wide AppThemeBinding styles, while the trading-terminal palette — whose colours are looked up by key both from XAML and from value converters — lives in a merged ResourceDictionary that is swapped between the dark and light variants here.

メソッド

Apply(Application, int)

Apply the persisted theme index: set UserAppTheme and swap the terminal palette.

HookSystemChanges(Application)

Re-sync the palette when the OS theme changes — only meaningful while the user keeps the "System" option, where UserAppTheme stays Unspecified.

ToAppTheme(int) : AppTheme

Maps the stored theme index to a MAUI AppTheme.