Use relay command for reset

This commit is contained in:
VictoriousRaptor 2024-06-09 17:11:51 +08:00
parent 7acd254c84
commit 7d81167bfd
3 changed files with 2 additions and 7 deletions

View file

@ -434,6 +434,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
Settings = settings;
}
[RelayCommand]
public void Reset()
{
SelectedQueryBoxFont = new FontFamily(DefaultFont);

View file

@ -245,9 +245,8 @@
<Button
Margin="8"
HorizontalAlignment="Stretch"
Click="Reset_Click"
Command="{Binding ResetCommand}"
Content="{DynamicResource resetCustomize}" />
</StackPanel>
</ScrollViewer>
</Border>

View file

@ -30,9 +30,4 @@ public partial class SettingsPaneTheme : Page
{
_viewModel.UpdateColorScheme();
}
private void Reset_Click(object sender, RoutedEventArgs e)
{
_viewModel.Reset();
}
}