Avalonia MapPolygon, MapPolyline

This commit is contained in:
ClemensFischer 2024-05-25 23:03:40 +02:00
parent bfa70de0cd
commit cf08a2baae
9 changed files with 40 additions and 25 deletions

View file

@ -4,7 +4,6 @@
using Avalonia.Controls.Shapes;
using Avalonia.Media;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
@ -21,7 +20,7 @@ namespace MapControl
public static readonly StyledProperty<Geometry> DataProperty =
DependencyPropertyHelper.AddOwner<MapPath, Geometry>(Path.DataProperty,
(path, oldValue, newValue) => path.DataPropertyChanged(oldValue, newValue));
(path, oldValue, newValue) => path.UpdateData());
public Geometry Data
{
@ -31,16 +30,6 @@ namespace MapControl
protected override Geometry CreateDefiningGeometry() => Data;
private void DataPropertyChanged(Geometry oldData, Geometry newData)
{
// Check if data is actually a new Geometry.
//
if (newData != null && !ReferenceEquals(newData, oldData))
{
UpdateData();
}
}
private void SetMapTransform(Matrix matrix)
{
if (Data.Transform is MatrixTransform transform)