Added Button to save - updated SplitView functionality - updated SplitViewOpenButton
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.Platform.Storage;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using SimpleDraw.Models;
|
||||
using SimpleDraw.Views;
|
||||
|
||||
namespace SimpleDraw.ViewModels;
|
||||
|
||||
@@ -13,8 +21,7 @@ public class ViewModelBase : ObservableObject
|
||||
{
|
||||
public int WindowWidth { get; set; } = 1200;
|
||||
public int WindowHeight { get; set; } = 800;
|
||||
|
||||
public ObservableCollection<ColorPickerButton>? ColorPalette { get; set; }
|
||||
public ObservableCollection<ColorPickerButton>? ColorPalette { get; set; }
|
||||
public IRelayCommand<PointerPressedEventArgs>? CanvasPointerPressedCommand { get; set; }
|
||||
public IRelayCommand<PointerEventArgs>? CanvasPointerMovedCommand { get; set; }
|
||||
public IRelayCommand<PointerReleasedEventArgs>? CanvasPointerReleasedCommand { get; set; }
|
||||
@@ -22,7 +29,15 @@ public class ViewModelBase : ObservableObject
|
||||
public DrawingPoints? DrawingPoint { get; set; }
|
||||
|
||||
protected bool IsDrawing { get; set; }
|
||||
|
||||
|
||||
private string _selectedColor = "Black";
|
||||
|
||||
public string SelectedColor
|
||||
{
|
||||
get => _selectedColor;
|
||||
set => SetProperty(ref _selectedColor, value);
|
||||
}
|
||||
|
||||
private Brush _brush = new SolidColorBrush(new Color(a: 255, r: 0, g: 0, b: 0));
|
||||
private double _brushThickness = 2.0;
|
||||
|
||||
@@ -31,7 +46,7 @@ public class ViewModelBase : ObservableObject
|
||||
get => _brush;
|
||||
set => SetProperty(ref _brush, value);
|
||||
}
|
||||
|
||||
|
||||
public double BrushThickness
|
||||
{
|
||||
get => _brushThickness;
|
||||
|
||||
Reference in New Issue
Block a user