47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using System.Collections.ObjectModel;
|
|
using Avalonia;
|
|
using Avalonia.Media;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace SimpleDraw.Models;
|
|
|
|
public class DrawingPoints : ObservableObject
|
|
{
|
|
private ObservableCollection<Point> _drawingPoints = new ObservableCollection<Point>();
|
|
// private ObservableCollection<ObservableCollection<Point>> _drawingPointsList = new ObservableCollection<ObservableCollection<Point>>();
|
|
|
|
private Brush _brush;
|
|
private double _brushThickness;
|
|
|
|
public Brush Brush
|
|
{
|
|
get => _brush;
|
|
set => SetProperty(ref _brush, value);
|
|
}
|
|
|
|
public double BrushThickness
|
|
{
|
|
get => _brushThickness;
|
|
set => SetProperty(ref _brushThickness, value);
|
|
}
|
|
|
|
public ObservableCollection<Point> CurrentDrawingPoints
|
|
{
|
|
get => _drawingPoints;
|
|
set => SetProperty(ref _drawingPoints, value);
|
|
}
|
|
|
|
public DrawingPoints(Brush brush, double brushThickness)
|
|
{
|
|
Brush = brush;
|
|
BrushThickness = brushThickness;
|
|
}
|
|
|
|
/*
|
|
public ObservableCollection<ObservableCollection<Point>> DrawingPointsList
|
|
{
|
|
get => _drawingPointsList;
|
|
set => SetProperty(ref _drawingPointsList, value);
|
|
}
|
|
*/
|
|
} |