Moved Menu into SplitView - Added Button to open SplitView

This commit is contained in:
Ano-sys
2025-02-20 23:19:34 +01:00
parent d4d7006dcb
commit 1177efcc58
4 changed files with 130 additions and 88 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
using Avalonia;
using System;
using Avalonia;
using Avalonia.Input;
using Avalonia.Media;
using CommunityToolkit.Mvvm.Input;
@@ -11,6 +12,8 @@ public class MainWindowViewModel : ViewModelBase
#pragma warning disable CA1822 // Mark members as static
public MainWindowViewModel()
{
DisplaySplitEvent = new RelayCommand(DisplaySplit);
ColorPalette =
[
new ColorPickerButton
+24 -1
View File
@@ -1,4 +1,5 @@
using System.Collections.ObjectModel;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using Avalonia.Input;
using Avalonia.Media;
@@ -36,4 +37,26 @@ public class ViewModelBase : ObservableObject
get => _brushThickness;
set => SetProperty(ref _brushThickness, value);
}
private double _buttonOffset = 0;
public double ButtonOffset
{
get => _buttonOffset;
set => SetProperty(ref _buttonOffset, value);
}
private bool _isSplitOpen = false;
public bool IsSplitOpen
{
get => _isSplitOpen;
set => SetProperty(ref _isSplitOpen, value);
}
public IRelayCommand DisplaySplitEvent { get; protected set; }
protected void DisplaySplit()
{
IsSplitOpen = !IsSplitOpen;
}
}