This commit is contained in:
Jöran Malek 2024-02-09 13:02:20 +01:00
parent 527efff89a
commit 4e7dfc56a8
9 changed files with 54 additions and 2 deletions

2
.gitattributes vendored
View file

@ -11,3 +11,5 @@
*.csx text encoding=UTF-8 diff=csharp *.csx text encoding=UTF-8 diff=csharp
*.json text encoding=UTF-8 diff=json *.json text encoding=UTF-8 diff=json
*.axaml text encoding=UTF-8 diff=xml

View file

@ -9,6 +9,7 @@
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.0.7" /> <PackageVersion Include="Avalonia.Fonts.Inter" Version="11.0.7" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.0.7" /> <PackageVersion Include="Avalonia.ReactiveUI" Version="11.0.7" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.0.7" /> <PackageVersion Include="Avalonia.Themes.Fluent" Version="11.0.7" />
<PackageVersion Include="Dock.Avalonia" Version="11.0.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.1" /> <PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.1" /> <PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.1" /> <PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />

View file

@ -1,7 +1,11 @@
using InkForge.Common.Controllers; using InkForge.Common.Controllers;
using InkForge.Common.Data; using InkForge.Common.Data;
using InkForge.Common.ViewModels;
using InkForge.Common.Views;
using InkForge.Data; using InkForge.Data;
using ReactiveUI;
namespace Microsoft.Extensions.DependencyInjection; namespace Microsoft.Extensions.DependencyInjection;
public static class InkForgeServiceCollections public static class InkForgeServiceCollections
@ -14,6 +18,8 @@ public static class InkForgeServiceCollections
services.AddSingleton<WorkspaceController>(); services.AddSingleton<WorkspaceController>();
services.AddTransient<IViewFor<LandingViewModel>, LandingView>();
return services; return services;
} }
} }

View file

@ -16,5 +16,6 @@ public class AppViewModel : ReactiveObject
public AppViewModel(WorkspaceController workspace) public AppViewModel(WorkspaceController workspace)
{ {
View = new LandingViewModel();
} }
} }

View file

@ -0,0 +1,13 @@
<UserControl 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"
xmlns:ifcvm="using:InkForge.Common.ViewModels"
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
x:Class="InkForge.Common.Views.LandingView"
x:DataType="ifcvm:LandingViewModel">
<Grid RowDefinitions="Auto, *, Auto">
</Grid>
</UserControl>

View file

@ -0,0 +1,13 @@
using Avalonia.ReactiveUI;
using InkForge.Common.ViewModels;
namespace InkForge.Common.Views;
public partial class LandingView : ReactiveUserControl<LandingViewModel>
{
public LandingView()
{
InitializeComponent();
}
}

View file

@ -10,6 +10,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia.Desktop" /> <PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Dock.Avalonia" />
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" /> <PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" />
</ItemGroup> </ItemGroup>

View file

@ -2,8 +2,23 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" xmlns:ifcvm="using:InkForge.Common.ViewModels"
xmlns:reactiveui="http://reactiveui.net"
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
x:Class="InkForge.Desktop.Views.MainWindow" x:Class="InkForge.Desktop.Views.MainWindow"
x:DataType="ifcvm:AppViewModel"
Title="InkForge"> Title="InkForge">
<NativeMenu.Menu>
<NativeMenu>
<NativeMenuItem Header="Test" />
</NativeMenu>
</NativeMenu.Menu>
<DockPanel>
<NativeMenuBar />
<reactiveui:ViewModelViewHost ViewModel="{CompiledBinding View}" />
</DockPanel>
</Window> </Window>