Version 6.0: Added WinUI

This commit is contained in:
Clemens 2021-06-14 21:41:37 +02:00
parent 4fc8594563
commit c215e1fb61
57 changed files with 287 additions and 90 deletions

View file

@ -4,7 +4,6 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace MapControl
{
@ -49,8 +48,12 @@ namespace MapControl
public static readonly DependencyProperty ViewScaleProperty = ViewScalePropertyKey.DependencyProperty;
private static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register(
"CenterPoint", typeof(Point), typeof(MapBase),
new PropertyMetadata(new Point(), (o, e) => ((MapBase)o).CenterPointPropertyChanged((Point)e.NewValue)));
"CenterPoint", typeof(Point), typeof(MapBase), new PropertyMetadata(new Point(),
(o, e) =>
{
var center = (Point)e.NewValue;
((MapBase)o).CenterPointPropertyChanged(new Location(center.Y, center.X));
}));
static MapBase()
{
@ -70,10 +73,5 @@ namespace MapControl
{
SetValue(ViewScalePropertyKey, scale);
}
private void CenterPointPropertyChanged(Point center)
{
CenterPointPropertyChanged(new Location(center.Y, center.X));
}
}
}