Prototyping
This commit is contained in:
+2
-2
@@ -1,9 +1,9 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.AddVaultContentHeaderView"
|
||||
x:Class="Bitvault.Avalonia.AddVaultContentCommandHeaderView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:AddVaultContentHeaderViewModel">
|
||||
x:DataType="vm:AddVaultContentCommandHeaderViewModel">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<x:Double x:Key="ButtonWidth">40</x:Double>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class AddVaultContentCommandHeaderView : UserControl
|
||||
{
|
||||
public AddVaultContentCommandHeaderView() => InitializeComponent();
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia
|
||||
{
|
||||
public partial class AddVaultContentHeaderView : UserControl
|
||||
{
|
||||
public AddVaultContentHeaderView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,44 +6,10 @@
|
||||
x:DataType="vm:AddVaultContentViewModel">
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="Loaded">
|
||||
<NavigateAction Context="{Binding Named, StringFormat='{}{0}:ContentHeader'}" Route="AddVaultContentHeader" />
|
||||
<NavigateAction Context="{Binding Named, StringFormat='{}{0}:ContentHeader'}" Route="AddVaultContentCommandHeader" />
|
||||
</EventTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
<Grid>
|
||||
<Grid.Styles>
|
||||
<Style Selector="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="DarkGray" />
|
||||
<Setter Property="Margin" Value="3" />
|
||||
<Setter Property="Background" Value="LightGray" />
|
||||
<Setter Property="Height" Value="60" />
|
||||
</Style>
|
||||
<Style Selector="Border.Header">
|
||||
<Setter Property="ResponsiveGrid.ExtraSmall" Value="12" />
|
||||
</Style>
|
||||
<Style Selector="Border.Section1">
|
||||
<Setter Property="ResponsiveGrid.ExtraSmall" Value="6" />
|
||||
<Setter Property="ResponsiveGrid.Small" Value="3" />
|
||||
<Setter Property="ResponsiveGrid.Medium" Value="2" />
|
||||
</Style>
|
||||
<Style Selector="Border.Section2">
|
||||
<Setter Property="ResponsiveGrid.ExtraSmall" Value="12" />
|
||||
<Setter Property="ResponsiveGrid.Small" Value="6" />
|
||||
<Setter Property="ResponsiveGrid.Medium" Value="2" />
|
||||
</Style>
|
||||
<Style Selector="Border.Footer">
|
||||
<Setter Property="ResponsiveGrid.ExtraSmall" Value="12" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<ResponsiveGrid>
|
||||
<Border Classes="Header" />
|
||||
<Border Classes="Section1" />
|
||||
<Border Classes="Section1" />
|
||||
<Border Classes="Section1" />
|
||||
<Border Classes="Section1" />
|
||||
<Border Classes="Section2" />
|
||||
<Border Classes="Section2" />
|
||||
<Border Classes="Footer" />
|
||||
</ResponsiveGrid>
|
||||
</Grid>
|
||||
<ScrollViewer Padding="12,12,12,0">
|
||||
<ItemsControl ItemTemplate="{ReflectionBinding Template}" ItemsSource="{Binding}" />
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
|
||||
@@ -8,6 +8,7 @@ using Toolkit.Avalonia;
|
||||
using Toolkit.Foundation;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using HotAvalonia;
|
||||
using Bitvault.Data;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
@@ -80,10 +81,12 @@ public partial class App : Application
|
||||
services.AddTemplate<VaultContentViewModel, VaultContentView>("VaultContent");
|
||||
|
||||
services.AddTemplate<AddVaultContentViewModel, AddVaultContentView>("AddVaultContent");
|
||||
services.AddTemplate<AddVaultContentHeaderViewModel, AddVaultContentHeaderView>("AddVaultContentHeader");
|
||||
services.AddTemplate<AddVaultContentCommandHeaderViewModel, AddVaultContentCommandHeaderView>("AddVaultContentCommandHeader");
|
||||
|
||||
services.AddTemplate<ConfirmVaultContentActionViewModel, ConfirmVaultContentActionView>();
|
||||
services.AddTemplate<DismissVaultContentActionViewModel, DismissVaultContentActionView>();
|
||||
|
||||
services.AddTemplate<VaultContentHeaderViewModel, VaultContentHeaderView>();
|
||||
});
|
||||
})!);
|
||||
|
||||
|
||||
@@ -43,6 +43,12 @@
|
||||
<Compile Update="AddVaultContentActionView.axaml.cs">
|
||||
<DependentUpon>AddVaultContentActionView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="AddVaultContentCommandHeaderView.axaml.cs">
|
||||
<DependentUpon>AddVaultContentCommandHeaderView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="VaultContentHeaderView.axaml.cs">
|
||||
<DependentUpon>VaultContentHeaderView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="OpenView.axaml.cs">
|
||||
<DependentUpon>OpenView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.VaultContentHeaderView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:VaultContentHeaderViewModel">
|
||||
<StackPanel Grid.Column="1" Spacing="18">
|
||||
<PersonPicture
|
||||
Width="96"
|
||||
Height="96"
|
||||
DisplayName="{Binding Value}" />
|
||||
<TextBox
|
||||
MaxWidth="360"
|
||||
Text="{Binding Value}"
|
||||
Watermark="Enter name" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class VaultContentHeaderView : UserControl
|
||||
{
|
||||
public VaultContentHeaderView() => InitializeComponent();
|
||||
}
|
||||
Reference in New Issue
Block a user