Add ability to fully delete items from the DB

This commit is contained in:
TheXamlGuy
2024-06-23 09:58:19 +01:00
parent 95de9d187f
commit db20ee15cc
18 changed files with 98 additions and 22 deletions
+3 -1
View File
@@ -105,6 +105,7 @@ public partial class App : Application
services.AddHandler<QueryWalletHandler>();
services.AddHandler<RequestItemHandler>();
services.AddHandler<CreateItemHandler>();
services.AddHandler<DeleteItemHandler>();
services.AddHandler<UpdateItemHander>();
services.AddHandler<UpdateItemStateHandler>();
services.AddHandler<CountCategoriesHandler>();
@@ -181,7 +182,8 @@ public partial class App : Application
services.AddHandler<ConfirmUpdateItemHandler>(nameof(ItemState.Write));
services.AddHandler<ConfirmCreateItemHandler>(nameof(ItemState.New));
services.AddHandler<ConfirmDeleteItemHandler>();
services.AddHandler<HyperlinkHandler>();
services.AddHandler<ItemChangedHandler>(ServiceLifetime.Singleton);
+1 -1
View File
@@ -16,7 +16,7 @@
Margin="0,3,0,0"
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="16"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
Text="&#xE073;" />
</Button>
+1 -1
View File
@@ -15,7 +15,7 @@
Margin="0,3,0,0"
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="16"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
Text="&#xE3EA;" />
</Button>
+3 -3
View File
@@ -14,9 +14,9 @@
<TextBlock
Margin="0,3,0,0"
VerticalAlignment="Center"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
FontSize="16"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
Text="&#xE107;" />
Text="&#xE5B9;" />
</Button>
</UserControl>
+1 -1
View File
@@ -15,7 +15,7 @@
Margin="0,3,0,0"
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="16"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
Text="&#xE607;" />
</Button>
+1 -1
View File
@@ -15,7 +15,7 @@
Margin="0,3,0,0"
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="16"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
Text="&#xE759;" />
</Button>
@@ -14,14 +14,14 @@
<TextBlock
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="16"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
IsVisible="{Binding !Value}"
Text="&#xEF61;" />
<TextBlock
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="16"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
IsVisible="{Binding Value}"
Text="&#xEF60;" />
+5
View File
@@ -5,6 +5,11 @@
xmlns:vm="using:Wallet"
x:DataType="vm:ItemSectionViewModel">
<ItemsControl ItemTemplate="{ReflectionBinding Template}" ItemsSource="{Binding}">
<ItemsControl.Styles>
<Style Selector="ContentPresenter">
<Setter Property="IsTabStop" Value="False" />
</Style>
</ItemsControl.Styles>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" Spacing="4" />
+7
View File
@@ -2,8 +2,15 @@
x:Class="Wallet.Avalonia.ItemView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="using:FluentAvalonia.UI.Controls"
xmlns:vm="using:Wallet"
x:DataType="vm:ItemViewModel">
<UserControl.Styles>
<Style Selector="ui|SettingsExpander">
<Setter Property="IsTabStop" Value="False" />
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
</Style>
</UserControl.Styles>
<Interaction.Behaviors>
<AttachedBehaviour>
<NavigateAction
@@ -10,12 +10,12 @@
VerticalAlignment="Center"
Command="{Binding InvokeCommand}"
Foreground="{DynamicResource IconForegroundBrush}"
ToolTip.Tip="Unarchive">
ToolTip.Tip="Restore">
<TextBlock
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentThemeFontFamily}"
FontSize="16"
FontSize="18"
Foreground="{DynamicResource IconForegroundBrush}"
Text="&#xF1A0;" />
Text="&#xE075;" />
</Button>
</UserControl>