Views
This commit is contained in:
parent
527efff89a
commit
4e7dfc56a8
9 changed files with 54 additions and 2 deletions
2
.gitattributes
vendored
2
.gitattributes
vendored
|
|
@ -11,3 +11,5 @@
|
|||
*.csx text encoding=UTF-8 diff=csharp
|
||||
|
||||
*.json text encoding=UTF-8 diff=json
|
||||
|
||||
*.axaml text encoding=UTF-8 diff=xml
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.0.7" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" 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.UI" Version="8.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="InkForge.Common.App"
|
||||
RequestedThemeVariant="Default">
|
||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
using InkForge.Common.Controllers;
|
||||
using InkForge.Common.Data;
|
||||
using InkForge.Common.ViewModels;
|
||||
using InkForge.Common.Views;
|
||||
using InkForge.Data;
|
||||
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
public static class InkForgeServiceCollections
|
||||
|
|
@ -14,6 +18,8 @@ public static class InkForgeServiceCollections
|
|||
|
||||
services.AddSingleton<WorkspaceController>();
|
||||
|
||||
services.AddTransient<IViewFor<LandingViewModel>, LandingView>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,6 @@ public class AppViewModel : ReactiveObject
|
|||
|
||||
public AppViewModel(WorkspaceController workspace)
|
||||
{
|
||||
View = new LandingViewModel();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
13
app/InkForge.Common/Views/LandingView.axaml
Normal file
13
app/InkForge.Common/Views/LandingView.axaml
Normal 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>
|
||||
13
app/InkForge.Common/Views/LandingView.axaml.cs
Normal file
13
app/InkForge.Common/Views/LandingView.axaml.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Desktop" />
|
||||
<PackageReference Include="Dock.Avalonia" />
|
||||
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,23 @@
|
|||
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"
|
||||
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:DataType="ifcvm:AppViewModel"
|
||||
Title="InkForge">
|
||||
<NativeMenu.Menu>
|
||||
<NativeMenu>
|
||||
<NativeMenuItem Header="Test" />
|
||||
</NativeMenu>
|
||||
</NativeMenu.Menu>
|
||||
|
||||
<DockPanel>
|
||||
<NativeMenuBar />
|
||||
|
||||
<reactiveui:ViewModelViewHost ViewModel="{CompiledBinding View}" />
|
||||
</DockPanel>
|
||||
</Window>
|
||||
Loading…
Add table
Add a link
Reference in a new issue