break wallet navigation off into seperate view

This commit is contained in:
TheXamlGuy
2024-07-10 15:21:02 +01:00
parent 762c867eaa
commit bd51de3245
24 changed files with 298 additions and 236 deletions
+13 -6
View File
@@ -1,14 +1,11 @@
using Avalonia.Xaml.Interactions.Core;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.ComponentModel;
using Toolkit.Foundation;
namespace Wallet;
[Notification(typeof(CreateEventArgs<IMainNavigationViewModel>), nameof(MainViewModel))]
[Notification(typeof(InsertEventArgs<IMainNavigationViewModel>), nameof(MainViewModel))]
public partial class MainViewModel :
ObservableCollection<IMainNavigationViewModel>
ObservableCollection<IMainNavigationViewModel>,
INotificationHandler<SelectionEventArgs<IWalletNavigationViewModel>>
{
[ObservableProperty]
private FooterViewModel footer;
@@ -27,4 +24,14 @@ public partial class MainViewModel :
}
public IContentTemplate Template { get; set; }
public Task Handle(SelectionEventArgs<IWalletNavigationViewModel> args)
{
if (args.Sender is not null)
{
SelectedItem = null;
}
return Task.CompletedTask;
}
}