Files
cfs-Tracker/Views/QuickEntryPage.xaml.cs
T
2026-03-19 23:11:13 +01:00

21 lines
562 B
C#

using Microsoft.Maui.Controls;
using cfs_tracker.ViewModels;
namespace cfs_tracker.Views;
public partial class QuickEntryPage : ContentPage, IQueryAttributable
{
private readonly QuickEntryViewModel _viewModel;
public QuickEntryPage(QuickEntryViewModel viewModel)
{
InitializeComponent();
BindingContext = _viewModel = viewModel;
}
public void ApplyQueryAttributes(IDictionary<string, object> query)
{
query.TryGetValue("date", out var value);
_viewModel.SetDateFromQuery(value?.ToString());
}
}