File attachment WIP

This commit is contained in:
TheXamlGuy
2024-07-24 21:18:39 +01:00
parent 455c633980
commit c3996d3bcc
11 changed files with 147 additions and 24 deletions
+5 -2
View File
@@ -114,6 +114,7 @@ public partial class App : Application
services.AddDbContextFactory<WalletContext>();
services.AddHandler<CreateFileAttachmentHandler>();
services.AddHandler<CreateProfileImageHandler>();
services.AddHandler<QueryWalletHandler>();
@@ -186,12 +187,13 @@ public partial class App : Application
services.AddTemplate<ItemSectionViewModel, ItemSectionView>();
services.AddTemplate<TextEntryViewModel, TextEntryView>();
services.AddTemplate<CreateCommentEntryViewModel, CreateCommentEntryView>();
services.AddTemplate<CommentEntryViewModel, CommentEntryView>();
services.AddTemplate<CommentEntryCollectionViewModel, CommentEntryCollectionView>();
services.AddTemplate<AttachmentEntryCollectionViewModel, AttachmentEntryCollectionView>();
services.AddTemplate<TextEntryViewModel, TextEntryView>();
services.AddTemplate<PasswordEntryViewModel, PasswordEntryView>();
services.AddTemplate<MaskedTextEntryViewModel, MaskedTextEntryView>();
services.AddTemplate<DropdownEntryCollectionViewModel, DropdownEntryCollectionView>();
@@ -222,6 +224,7 @@ public partial class App : Application
services.AddHandler<FavouriteItemHandler>();
services.AddHandler<UnfavouriteItemHandler>();
services.AddHandler<AttachmentEntryCollectionViewModelHandler>(nameof(AttachmentEntryCollectionConfiguration));
services.AddHandler<TextEntryViewModelHandler>(nameof(TextEntryConfiguration));
services.AddHandler<CommentEntryCollectionViewModelHandler>(nameof(CommentEntryCollectionConfiguration));
services.AddHandler<PasswordEntryViewModelHandler>(nameof(PasswordEntryConfiguration));
@@ -0,0 +1,15 @@
<SettingsExpander
x:Class="Wallet.Avalonia.AttachmentEntryCollectionView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Wallet"
x:DataType="vm:AttachmentEntryCollectionViewModel"
Header="{Binding Key}"
IsExpanded="True"
IsToggleable="{Binding Count}"
ItemTemplate="{ReflectionBinding Template}"
ItemsSource="{Binding}">
<SettingsExpander.Action>
<Button Command="{Binding InvokeCommand}" />
</SettingsExpander.Action>
</SettingsExpander>
@@ -0,0 +1,10 @@
using Toolkit.UI.Controls.Avalonia;
namespace Wallet.Avalonia;
public partial class AttachmentEntryCollectionView :
SettingsExpander
{
public AttachmentEntryCollectionView() =>
InitializeComponent();
}