Replace ReactiveUI
This commit is contained in:
parent
43b4d50e43
commit
5584ab4ec8
41 changed files with 472 additions and 1013 deletions
15
app/InkForge.Desktop/Views/Documents/NoteEditDocument.axaml
Normal file
15
app/InkForge.Desktop/Views/Documents/NoteEditDocument.axaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<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:vm="using:InkForge.Desktop.ViewModels.Documents"
|
||||
xmlns:avaloniaedit="https://github.com/avaloniaui/avaloniaedit"
|
||||
xmlns:inkforge="app:InkForge"
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="800"
|
||||
d:DesignHeight="450"
|
||||
x:Class="InkForge.Desktop.Views.Documents.NoteEditDocument"
|
||||
x:DataType="vm:NoteEditDocumentViewModel"
|
||||
inkforge:TopLevels.Register="{CompiledBinding}">
|
||||
<avaloniaedit:TextEditor Document="{CompiledBinding Document}" />
|
||||
</UserControl>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Avalonia.Controls;
|
||||
|
||||
namespace InkForge.Desktop.Views.Documents;
|
||||
|
||||
public partial class NoteEditDocument : UserControl
|
||||
{
|
||||
public NoteEditDocument()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
|
|
@ -28,11 +28,11 @@
|
|||
|
||||
<Menu Grid.Row="2">
|
||||
<MenuItem Header="Create New"
|
||||
Command="{CompiledBinding CreateNew}" />
|
||||
Command="{CompiledBinding CreateNewCommand}" />
|
||||
<MenuItem Header="Open"
|
||||
IsEnabled="False" />
|
||||
<MenuItem Header="Open File"
|
||||
Command="{CompiledBinding OpenNew}" />
|
||||
Command="{CompiledBinding OpenNewCommand}" />
|
||||
</Menu>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
using Avalonia.ReactiveUI;
|
||||
|
||||
using InkForge.Desktop.ViewModels.Documents;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace InkForge.Desktop.Views.Documents;
|
||||
|
||||
public partial class WelcomePageDocument : ReactiveUserControl<WelcomePageDocumentViewModel>
|
||||
public partial class WelcomePageDocument : UserControl
|
||||
{
|
||||
public WelcomePageDocument()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using Avalonia;
|
||||
using Avalonia.ReactiveUI;
|
||||
using Avalonia.Controls;
|
||||
|
||||
using InkForge.Desktop.ViewModels;
|
||||
|
||||
|
|
@ -7,12 +7,12 @@ using Microsoft.Extensions.DependencyInjection;
|
|||
|
||||
namespace InkForge.Desktop.Views;
|
||||
|
||||
public partial class MainWindow : ReactiveWindow<MainViewModel>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = CreateViewModel();
|
||||
DataContext = CreateViewModel();
|
||||
}
|
||||
|
||||
private static MainViewModel CreateViewModel()
|
||||
|
|
|
|||
|
|
@ -29,4 +29,4 @@
|
|||
</Style>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
using Avalonia.ReactiveUI;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace InkForge.Desktop.Views.Tools;
|
||||
|
||||
public partial class WorkspaceTool : ReactiveUserControl<ViewModels.Tools.WorkspaceTool>
|
||||
public partial class WorkspaceTool : UserControl
|
||||
{
|
||||
public WorkspaceTool()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
|
||||
<Grid ColumnDefinitions="*, Auto"
|
||||
RowDefinitions="Auto, *">
|
||||
<TextBlock Grid.Column="0"
|
||||
<TextBlock Text="{CompiledBinding Name}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0" />
|
||||
|
||||
<StackPanel Classes="WorkspaceToolbar"
|
||||
|
|
@ -29,25 +30,9 @@
|
|||
<Button>
|
||||
<inkforge:FluentSymbolIcon Symbol="subtract_square_multiple" />
|
||||
</Button>
|
||||
|
||||
<!-- <StackPanel.Styles>
|
||||
<Style Selector="#ToolBar > :is(TemplatedControl)">
|
||||
<Setter Property="Background"
|
||||
Value="Transparent" />
|
||||
<Setter Property="Padding"
|
||||
Value="1" />
|
||||
<Setter Property="VerticalAlignment"
|
||||
Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="#FilesView:not(:pointerover) StackPanel">
|
||||
<Setter Property="IsVisible"
|
||||
Value="False" />
|
||||
</Style>
|
||||
</StackPanel.Styles> -->
|
||||
</StackPanel>
|
||||
|
||||
<TreeView Grid.ColumnSpan="2"
|
||||
Grid.Row="1" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
using Avalonia.ReactiveUI;
|
||||
|
||||
using InkForge.Desktop.ViewModels.Workspaces;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace InkForge.Desktop.Views.Workspaces;
|
||||
|
||||
public partial class WorkspaceView : ReactiveUserControl<WorkspaceViewModel>
|
||||
public partial class WorkspaceView : UserControl
|
||||
{
|
||||
public WorkspaceView()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue