Utopia-Canteen-System/Views/SettingsView.xaml.cs

24 lines
597 B
C#

using System.Windows.Controls;
using UtopiaCanteenSystem.ViewModels;
namespace UtopiaCanteenSystem.Views;
/// <summary>
/// Settings view: editable API endpoint, save button, load from config.
/// No logic in code-behind; all binding and commands in ViewModel.
/// </summary>
public partial class SettingsView : UserControl
{
public SettingsView()
{
InitializeComponent();
}
public SettingsView(SettingsViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel;
Loaded += (_, _) => viewModel.RefreshCacheSyncTimestamps();
}
}