This commit is contained in:
TheXamlGuy
2024-05-31 14:07:35 +01:00
parent eb5306f956
commit 93130c3116
26 changed files with 147 additions and 71 deletions
+14
View File
@@ -9,8 +9,12 @@ public partial class ItemHeaderViewModel : Observable<string, string>,
INotificationHandler<UpdateEventArgs<Item>>,
INotificationHandler<ConfirmEventArgs<Item>>,
INotificationHandler<CancelEventArgs<Item>>,
INotificationHandler<NotifyEventArgs<ItemCategory<string>>>,
IItemEntryViewModel
{
[ObservableProperty]
private string? category;
[ObservableProperty]
private ItemState state;
@@ -56,4 +60,14 @@ public partial class ItemHeaderViewModel : Observable<string, string>,
State = ItemState.Read;
return Task.CompletedTask;
}
public Task Handle(NotifyEventArgs<ItemCategory<string>> args)
{
if (args.Value is ItemCategory<string> category)
{
Category = category.Value;
}
return Task.CompletedTask;
}
}