wip
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.AddVaultContentActionView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Width="{StaticResource ButtonWidth}"
|
||||
Height="{StaticResource ButtonHeight}"
|
||||
VerticalAlignment="Center"
|
||||
BorderThickness="0"
|
||||
Content=""
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="16"
|
||||
ToolTip.Tip="Add item">
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="Click">
|
||||
<NavigateAction Context="Content" Route="AddVaultContent" />
|
||||
</EventTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
</Button>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class AddVaultContentActionView : UserControl
|
||||
{
|
||||
public AddVaultContentActionView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.AddVaultContentView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
Add vault content placeholder
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class AddVaultContentView : UserControl
|
||||
{
|
||||
public AddVaultContentView() => InitializeComponent();
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:AllNavigationViewModel"
|
||||
Content="All"
|
||||
IsSelected="{Binding Selected, Mode=TwoWay}">
|
||||
IsSelected="{Binding Selected}">
|
||||
<Interaction.Behaviors>
|
||||
<DataTriggerBehavior Binding="{Binding Selected}" Value="True">
|
||||
<ConditionAction>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||
RequestedThemeVariant="Dark">
|
||||
RequestedThemeVariant="Default">
|
||||
<Application.Styles>
|
||||
<ThemeResources />
|
||||
<ThemeResources PreferUserAccentColor="True" />
|
||||
<Style Selector="ui|SettingsExpanderItem">
|
||||
<Style Selector="^ /template/ Expander#Expander">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
|
||||
@@ -72,9 +72,13 @@ public partial class App : Application
|
||||
services.AddTemplate<VaultViewModel, VaultView>("Vault");
|
||||
services.AddHandler<VaultViewModelHandler>();
|
||||
|
||||
services.AddTemplate<LockerNavigationViewModel, LockerNavigationView>();
|
||||
services.AddTemplate<VaultSearchHeaderViewModel, VaultSearchHeaderView>("VaultSearchHeader");
|
||||
services.AddTemplate<VaultHeaderViewModel, VaultHeaderView>("VaultHeader");
|
||||
services.AddTemplate<AddVaultContentActionViewModel, AddVaultContentActionView>();
|
||||
services.AddTemplate<AddVaultContentViewModel, AddVaultContentView>("AddVaultContent");
|
||||
services.AddTemplate<VaultContentViewModel, VaultContentView>("VaultContent");
|
||||
|
||||
services.AddTemplate<VaultCommandViewModel, VaultCommandView>("VaultCommands");
|
||||
services.AddTemplate<VaultContentNavigationViewModel, VaultContentNavigationView>();
|
||||
});
|
||||
})!);
|
||||
|
||||
|
||||
@@ -12,22 +12,25 @@
|
||||
<DefineConstants>$(DefineConstants);ENABLE_XAML_HOT_RELOAD</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Condition="$(DefineConstants.Contains(ENABLE_XAML_HOT_RELOAD))" Include="Avalonia.Markup.Xaml.Loader" Version="11.1.0-beta1" />
|
||||
<PackageReference Condition="$(DefineConstants.Contains(ENABLE_XAML_HOT_RELOAD))" Include="HotAvalonia" Version="1.1.0" />
|
||||
<PackageReference Include="HotAvalonia.Extensions" Version="1.1.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.0-beta1" />
|
||||
<Compile Remove="VaultContentNavigationView.axaml.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Condition="$(DefineConstants.Contains(ENABLE_XAML_HOT_RELOAD))" Include="Avalonia.Markup.Xaml.Loader" Version="11.1.0-beta2" />
|
||||
<PackageReference Condition="$(DefineConstants.Contains(ENABLE_XAML_HOT_RELOAD))" Include="HotAvalonia" Version="1.1.1" />
|
||||
<PackageReference Include="HotAvalonia.Extensions" Version="1.1.1" PrivateAssets="All" />
|
||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.0-beta2" />
|
||||
<PackageReference Include="Avalonia.Labs.Controls" Version="11.0.10.1" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||
<PackageReference Include="FluentAvaloniaUI" Version="2.1.0-preview2" />
|
||||
<PackageReference Include="FluentAvaloniaUI" Version="2.1.0-preview1" />
|
||||
<PackageReference Include="System.Reactive" Version="6.0.1-preview.1" />
|
||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.1.0-beta1" />
|
||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.1.0-beta2.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0-preview.3.24172.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0-preview.3.24172.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.0-beta1" />
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.0-beta2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Bitvault\Bitvault.csproj" />
|
||||
@@ -37,12 +40,18 @@
|
||||
<ProjectReference Include="..\Toolkit\Toolkit.UI.Controls.Avalonia\Toolkit.UI.Controls.Avalonia.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="AddVaultContentActionView.axaml.cs">
|
||||
<DependentUpon>AddVaultContentActionView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="OpenView.axaml.cs">
|
||||
<DependentUpon>OpenView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="ManageNavigationView.axaml.cs">
|
||||
<DependentUpon>ManageNavigationView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="VaultHeaderView.axaml.cs">
|
||||
<DependentUpon>VaultHeaderView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="VaultNavigationView.axaml.cs">
|
||||
<DependentUpon>VaultNavigationView.axaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<ListBoxItem
|
||||
x:Class="Bitvault.Avalonia.LockerNavigationView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
Welcome to Avalonia!
|
||||
</ListBoxItem>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class VaultContentNavigationView : ListBoxItem
|
||||
{
|
||||
public VaultContentNavigationView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.VaultContentView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
Vault content placeholder
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class VaultContentView : UserControl
|
||||
{
|
||||
public VaultContentView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.VaultHeaderView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Bitvault"
|
||||
x:DataType="vm:VaultHeaderViewModel">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="16,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Value}"
|
||||
Theme="{DynamicResource BodyStrongTextBlockStyle}" />
|
||||
<ItemsControl
|
||||
Grid.Column="1"
|
||||
Margin="0,0,4,0"
|
||||
VerticalAlignment="Center"
|
||||
ItemTemplate="{ReflectionBinding Template}"
|
||||
ItemsSource="{Binding}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
public partial class VaultHeaderView : UserControl
|
||||
{
|
||||
public VaultHeaderView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<UserControl
|
||||
x:Class="Bitvault.Avalonia.VaultSearchHeaderView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<AutoCompleteBox VerticalAlignment="Center" />
|
||||
</UserControl>
|
||||
+2
-2
@@ -2,9 +2,9 @@ using Avalonia.Controls;
|
||||
|
||||
namespace Bitvault.Avalonia
|
||||
{
|
||||
public partial class LockerNavigationView : UserControl
|
||||
public partial class VaultSearchHeaderView : UserControl
|
||||
{
|
||||
public LockerNavigationView()
|
||||
public VaultSearchHeaderView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
@@ -11,29 +11,27 @@
|
||||
<SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="{DynamicResource SubtleFillColorSecondary}" />
|
||||
<SolidColorBrush x:Key="ButtonBackgroundPressed" Color="{DynamicResource SubtleFillColorTertiary}" />
|
||||
</UserControl.Resources>
|
||||
<Grid ColumnDefinitions="1*,Auto,2*">
|
||||
<Grid Grid.Column="0" RowDefinitions="Auto,*">
|
||||
<Grid
|
||||
Height="40"
|
||||
Margin="0,4,0,0"
|
||||
ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Filter}" />
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Width="{StaticResource ButtonWidth}"
|
||||
Height="{StaticResource ButtonHeight}"
|
||||
VerticalAlignment="Center"
|
||||
BorderThickness="0"
|
||||
Content=""
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="16" />
|
||||
</Grid>
|
||||
<ListBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="0,-1,0,0"
|
||||
ItemTemplate="{ReflectionBinding Template}"
|
||||
ItemsSource="{Binding}" />
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="320,*" RowDefinitions="Auto,*">
|
||||
<ContentControl
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Height="40"
|
||||
Margin="4,4,0,0">
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="Loaded">
|
||||
<NavigateAction Context="{Binding $self}" Route="VaultHeader" />
|
||||
</EventTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
</ContentControl>
|
||||
<ListBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="2,-1,0,0"
|
||||
ItemTemplate="{ReflectionBinding Template}"
|
||||
ItemsSource="{Binding}" />
|
||||
<Frame
|
||||
x:Name="Content"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -4,6 +4,7 @@ using Toolkit.Foundation;
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
[NavigationTarget("Header")]
|
||||
[NavigationTarget("Content")]
|
||||
public partial class VaultView : UserControl
|
||||
{
|
||||
public VaultView() => InitializeComponent();
|
||||
|
||||
Reference in New Issue
Block a user