wip item images

This commit is contained in:
TheXamlGuy
2024-07-01 21:41:13 +01:00
parent 4c663fdbe4
commit ecd493d1a7
9 changed files with 51 additions and 58 deletions
+13 -3
View File
@@ -5,7 +5,7 @@ using Toolkit.Foundation;
namespace Wallet;
public partial class ItemHeaderViewModel :
Observable<string, string>,
Observable<string>,
INotificationHandler<UpdateEventArgs<Item>>,
INotificationHandler<ConfirmEventArgs<Item>>,
INotificationHandler<CancelEventArgs<Item>>,
@@ -19,6 +19,7 @@ public partial class ItemHeaderViewModel :
[ObservableProperty]
private IImageDescriptor? imageDescriptor;
[ObservableProperty]
private ItemState state;
@@ -30,13 +31,14 @@ public partial class ItemHeaderViewModel :
IDisposer disposer,
ItemHeaderConfiguration configuration,
ItemState state,
string key,
string value) : base(provider, factory, mediator, publisher, subscriber, disposer, key, value)
string value,
IImageDescriptor? imageDescriptor = null) : base(provider, factory, mediator, publisher, subscriber, disposer, value)
{
this.configuration = configuration;
State = state;
Value = value;
ImageDescriptor = imageDescriptor;
Track(nameof(Value), () => Value, newValue => Value = newValue);
}
@@ -85,4 +87,12 @@ public partial class ItemHeaderViewModel :
configuration.Name = Value;
}
}
partial void OnImageDescriptorChanging(IImageDescriptor? value)
{
if (configuration is not null)
{
configuration.ImageDescriptor = value;
}
}
}