22 lines
462 B
C#
22 lines
462 B
C#
|
using TodoDetails.ViewModel;
|
||
|
|
||
|
namespace TodoDetails.View;
|
||
|
|
||
|
public partial class SettingsPage : ContentPage
|
||
|
{
|
||
|
public SettingsPage(SettingsViewModel viewModel)
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
BindingContext = viewModel;
|
||
|
}
|
||
|
|
||
|
private void SelectedThemeChanged(object sender, EventArgs e)
|
||
|
{
|
||
|
var selectedItem = (string)ThemePicker.SelectedItem;
|
||
|
|
||
|
if (selectedItem != null)
|
||
|
{
|
||
|
(BindingContext as SettingsViewModel)?.LoadNewTheme(selectedItem);
|
||
|
}
|
||
|
}
|
||
|
}
|