XAML-Map-Control/MapControl/Avalonia/MapPath.Avalonia.cs

21 lines
537 B
C#
Raw Normal View History

2025-08-19 19:43:02 +02:00
using Avalonia;
using Avalonia.Controls.Shapes;
using Avalonia.Media;
2024-08-30 16:37:40 +02:00
2026-04-13 17:14:49 +02:00
namespace MapControl;
2024-05-25 18:58:51 +02:00
2026-04-13 17:14:49 +02:00
public partial class MapPath : Shape
{
public static readonly StyledProperty<Geometry> DataProperty =
DependencyPropertyHelper.AddOwner<MapPath, Geometry>(Path.DataProperty,
(path, oldValue, newValue) => path.UpdateData());
2024-05-25 18:58:51 +02:00
2026-04-13 17:14:49 +02:00
public Geometry Data
{
get => GetValue(DataProperty);
set => SetValue(DataProperty, value);
2024-05-25 18:58:51 +02:00
}
2026-04-13 17:14:49 +02:00
protected override Geometry CreateDefiningGeometry() => Data;
2024-05-25 18:58:51 +02:00
}