Merge Common to Desktop

This commit is contained in:
Jöran Malek 2024-02-16 02:23:58 +01:00
parent 26915defe1
commit e9c6e14965
40 changed files with 447 additions and 282 deletions

View file

@ -0,0 +1,42 @@
<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:reactiveui="http://reactiveui.net"
xmlns:vm="using:InkForge.Desktop.ViewModels"
xmlns:services="using:InkForge.Desktop.Services"
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
x:Class="InkForge.Desktop.Views.LandingView"
x:DataType="vm:LandingViewModel"
services:TopLevels.Register="{CompiledBinding}">
<Grid RowDefinitions="Auto, *, Auto">
<Label Content="Open Recent"
Grid.Row="0" />
<DataGrid IsEnabled="False"
IsReadOnly="True"
ItemsSource="{CompiledBinding RecentItems}"
Grid.Row="1">
<DataGrid.Columns>
<DataGridTextColumn Header="Created"
Binding="{CompiledBinding Created, StringFormat={}{0:d}}" />
<DataGridTextColumn Header="Name"
Width="*"
Binding="{CompiledBinding Name}" />
<DataGridTextColumn Header="Last Used"
Binding="{CompiledBinding LastUsed, StringFormat={}{0:d}}" />
</DataGrid.Columns>
</DataGrid>
<Menu Grid.Row="2">
<MenuItem Header="Create New"
Command="{CompiledBinding CreateNew}" />
<MenuItem Header="Open"
IsEnabled="False" />
<MenuItem Header="Open File"
Command="{CompiledBinding OpenNew}" />
</Menu>
</Grid>
</UserControl>

View file

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

View file

@ -3,22 +3,16 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:ifcvm="using:InkForge.Common.ViewModels"
xmlns:vm="using:InkForge.Desktop.ViewModels"
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>
x:DataType="vm:AppViewModel"
Title="MainWindow">
<DockPanel>
<NativeMenuBar />
<DockPanel>
<NativeMenuBar />
<reactiveui:ViewModelViewHost ViewModel="{CompiledBinding View}" />
</DockPanel>
<reactiveui:ViewModelViewHost ViewModel="{CompiledBinding View}" />
</DockPanel>
</Window>

View file

@ -1,6 +1,6 @@
using Avalonia.ReactiveUI;
using InkForge.Common.ViewModels;
using InkForge.Desktop.ViewModels;
namespace InkForge.Desktop.Views;

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:reactiveui="http://reactiveui.net"
xmlns:vm="using:InkForge.Desktop.ViewModels"
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
x:Class="InkForge.Desktop.Views.WorkspaceView"
x:DataType="vm:WorkspaceViewModel">
Welcome to Avalonia!
</UserControl>

View file

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