Got adding working again
This commit is contained in:
@@ -68,7 +68,8 @@ public partial class App : Application
|
||||
}
|
||||
});
|
||||
|
||||
services.AddHandler<QueryContainerHandler>(ServiceLifetime.Singleton);
|
||||
services.AddHandler<QueryContainerHandler>();
|
||||
services.AddHandler<CreateItemHander>();
|
||||
|
||||
services.AddHandler<OpenContainerHandler>();
|
||||
|
||||
@@ -91,6 +92,7 @@ public partial class App : Application
|
||||
|
||||
services.AddTemplate<ItemNavigationViewModel, ItemNavigationView>();
|
||||
services.AddTemplate<ItemViewModel, ItemView>("Item");
|
||||
services.AddHandler<AggerateItemViewModelHandler>();
|
||||
|
||||
services.AddTemplate<ItemCommandHeaderViewModel, ItemCommandHeaderView>("ItemCommandHeader");
|
||||
|
||||
@@ -111,6 +113,8 @@ public partial class App : Application
|
||||
services.AddHandler<UnarchiveItemHandler>(ServiceLifetime.Scoped);
|
||||
services.AddHandler<FavouriteItemHandler>(ServiceLifetime.Scoped);
|
||||
services.AddHandler<UnfavouriteItemHandler>(ServiceLifetime.Scoped);
|
||||
|
||||
services.AddHandler<ItemActivatedHandler>(ServiceLifetime.Singleton);
|
||||
});
|
||||
})!);
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
HotKey="Delete"
|
||||
ToolTip.Tip="Archive">
|
||||
<TextBlock
|
||||
Margin="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
ToolTip.Tip="Save">
|
||||
<TextBlock
|
||||
Margin="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
|
||||
@@ -4,5 +4,16 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:ContainerHeaderViewModel">
|
||||
<ItemsControl ItemTemplate="{ReflectionBinding Template}" ItemsSource="{Binding}" />
|
||||
<ItemsControl ItemTemplate="{ReflectionBinding Template}" ItemsSource="{Binding}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Grid ColumnDefinitions="Auto,6,*" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Styles>
|
||||
<Style Selector="ContentPresenter">
|
||||
<Setter Property="Grid.Column" Value="{ReflectionBinding Index}" />
|
||||
</Style>
|
||||
</ItemsControl.Styles>
|
||||
</ItemsControl>
|
||||
</UserControl>
|
||||
|
||||
@@ -4,14 +4,17 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:ContainerViewModel">
|
||||
<Grid ColumnDefinitions="320,Auto,*" RowDefinitions="Auto,*">
|
||||
<Grid
|
||||
x:Name="Container"
|
||||
ColumnDefinitions="320,Auto,*,Auto"
|
||||
Grid.IsSharedSizeScope="True"
|
||||
RowDefinitions="Auto,*">
|
||||
<Grid
|
||||
x:Name="Title"
|
||||
Grid.Row="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Height="44"
|
||||
ColumnDefinitions="*, Auto">
|
||||
<ContentControl Grid.Column="0" VerticalAlignment="Center">
|
||||
Margin="8,0,0,0">
|
||||
<ContentControl VerticalAlignment="Center">
|
||||
<Interaction.Behaviors>
|
||||
<AttachedBehaviour>
|
||||
<NavigateAction Region="{Binding $self}" Route="ContainerHeader" />
|
||||
@@ -42,6 +45,7 @@
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
||||
BorderThickness="1,1,0,0"
|
||||
|
||||
@@ -14,7 +14,7 @@ public partial class ContainerView : UserControl
|
||||
|
||||
if (VisualRoot is AppWindow appWindow)
|
||||
{
|
||||
Title.ColumnDefinitions[1].Width = new GridLength(appWindow.TitleBar.RightInset, GridUnitType.Pixel);
|
||||
Container.ColumnDefinitions[3].Width = new GridLength(appWindow.TitleBar.RightInset, GridUnitType.Pixel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,16 +5,33 @@
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:CreateItemActionViewModel">
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Width="{StaticResource ButtonWidth}"
|
||||
Height="{StaticResource ButtonHeight}"
|
||||
VerticalAlignment="Center"
|
||||
Content=""
|
||||
Height="32"
|
||||
MinWidth="144"
|
||||
HorizontalContentAlignment="Center"
|
||||
Classes="accent"
|
||||
CornerRadius="16"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="16"
|
||||
ToolTip.Tip="Add item">
|
||||
ToolTip.Tip="New Item">
|
||||
<Grid ColumnDefinitions="Auto,8,*">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="-6,3,0,0"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
Grid.Column="2"
|
||||
Margin="0,2,0,0"
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
Text="New Item" />
|
||||
</Grid>
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="Click">
|
||||
<NavigateAction
|
||||
Region="{Binding Named, StringFormat='{}{0}:ContentHeader'}"
|
||||
Route="ItemCommandHeader"
|
||||
Scope="self" />
|
||||
<NavigateAction
|
||||
Region="{Binding Named, StringFormat='{}{0}:Content'}"
|
||||
Route="Item"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
ToolTip.Tip="Delete">
|
||||
<TextBlock
|
||||
Margin="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="16"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
ToolTip.Tip="Cancel">
|
||||
<TextBlock
|
||||
Margin="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
Foreground="{DynamicResource IconForegroundBrush}"
|
||||
ToolTip.Tip="Edit">
|
||||
<TextBlock
|
||||
Margin="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource FluentThemeFontFamily}"
|
||||
FontSize="16"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
Route="Item"
|
||||
Scope="self">
|
||||
<NavigateAction.ParameterBindings>
|
||||
<ParameterBinding Key="Immutable" Value="{x:True}" />
|
||||
<ParameterBinding Key="Archived" Value="{Binding Archived}" />
|
||||
<ParameterBinding Key="Favourite" Value="{Binding Favourite}" />
|
||||
</NavigateAction.ParameterBindings>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
MaxWidth="500"
|
||||
CornerRadius="16"
|
||||
Text="{Binding Value}"
|
||||
TextBlock.TextAlignment="Center"
|
||||
Watermark="Search">
|
||||
<Interaction.Behaviors>
|
||||
<KeyBindingTriggerBehaviour Gesture="Enter">
|
||||
|
||||
Reference in New Issue
Block a user