30 lines
583 B
C#
30 lines
583 B
C#
using CommunityToolkit.WinUI.UI.Controls;
|
|
|
|
using Estara.ViewModels;
|
|
|
|
using Microsoft.UI.Xaml.Controls;
|
|
|
|
namespace Estara.Views;
|
|
|
|
public sealed partial class ListDetailsPage : Page
|
|
{
|
|
public ListDetailsViewModel ViewModel
|
|
{
|
|
get;
|
|
}
|
|
|
|
public ListDetailsPage()
|
|
{
|
|
ViewModel = App.GetService<ListDetailsViewModel>();
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OnViewStateChanged(object sender, ListDetailsViewState e)
|
|
{
|
|
if (e == ListDetailsViewState.Both)
|
|
{
|
|
ViewModel.EnsureItemSelected();
|
|
}
|
|
}
|
|
}
|