fix: unregister from old scope.

This commit is contained in:
rabbitism
2024-02-06 22:12:16 +08:00
parent b297b3f5aa
commit 95321030c8
2 changed files with 9 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ public class ThemeToggleButton: ThemeSelectorBase
SetCurrentValue(SelectedThemeProperty, newTheme.Value ? ThemeVariant.Light : ThemeVariant.Dark);
}
protected internal override void SyncThemeFromScope(ThemeVariant? theme)
protected override void SyncThemeFromScope(ThemeVariant? theme)
{
base.SyncThemeFromScope(theme);
PropertyHelper.SetValue(ToggleButton.IsCheckedProperty, theme == ThemeVariant.Light, _button);