mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Cleanup of global usings
This commit is contained in:
parent
0a427a90de
commit
81eabef257
|
|
@ -1,4 +1,7 @@
|
||||||
using System;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Data;
|
||||||
|
using System;
|
||||||
|
|
||||||
#pragma warning disable AVP1001
|
#pragma warning disable AVP1001
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
using System;
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Media.Imaging;
|
||||||
|
using Avalonia.Platform;
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
namespace MapControl
|
using Avalonia.Animation;
|
||||||
|
|
||||||
|
namespace MapControl
|
||||||
{
|
{
|
||||||
public class LocationAnimator : InterpolatingAnimator<Location>
|
public class LocationAnimator : InterpolatingAnimator<Location>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using System;
|
using Avalonia;
|
||||||
|
using Avalonia.Input;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,16 @@
|
||||||
global using Avalonia;
|
global using DependencyProperty = Avalonia.AvaloniaProperty;
|
||||||
global using Avalonia.Animation;
|
|
||||||
global using Avalonia.Animation.Easings;
|
|
||||||
global using Avalonia.Controls;
|
|
||||||
global using Avalonia.Controls.Documents;
|
|
||||||
global using Avalonia.Data;
|
|
||||||
global using Avalonia.Data.Converters;
|
|
||||||
global using Avalonia.Input;
|
|
||||||
global using Avalonia.Interactivity;
|
|
||||||
global using Avalonia.Media;
|
|
||||||
global using Avalonia.Media.Imaging;
|
|
||||||
global using Avalonia.Platform;
|
|
||||||
global using Avalonia.Styling;
|
|
||||||
global using Avalonia.Threading;
|
|
||||||
global using DependencyObject = Avalonia.AvaloniaObject;
|
|
||||||
global using DependencyProperty = Avalonia.AvaloniaProperty;
|
|
||||||
global using FrameworkElement = Avalonia.Controls.Control;
|
global using FrameworkElement = Avalonia.Controls.Control;
|
||||||
global using HorizontalAlignment = Avalonia.Layout.HorizontalAlignment;
|
|
||||||
global using VerticalAlignment = Avalonia.Layout.VerticalAlignment;
|
|
||||||
global using Brush = Avalonia.Media.IBrush;
|
global using Brush = Avalonia.Media.IBrush;
|
||||||
global using ImageSource = Avalonia.Media.IImage;
|
global using ImageSource = Avalonia.Media.IImage;
|
||||||
global using BitmapSource = Avalonia.Media.Imaging.Bitmap;
|
|
||||||
global using PathFigureCollection = Avalonia.Media.PathFigures;
|
|
||||||
global using PointCollection = System.Collections.Generic.List<Avalonia.Point>;
|
|
||||||
global using PropertyPath = System.String;
|
global using PropertyPath = System.String;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Animation;
|
||||||
|
using Avalonia.Animation.Easings;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Documents;
|
||||||
|
using Avalonia.Data;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Styling;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
namespace MapControl
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace MapControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ContentControl placed on a MapPanel at a geographic location specified by the Location property.
|
/// ContentControl placed on a MapPanel at a geographic location specified by the Location property.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
using System.Collections.Generic;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Documents;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using System.Threading.Tasks;
|
using Avalonia.Animation;
|
||||||
|
using Avalonia.Styling;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
namespace MapControl
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Input;
|
||||||
|
|
||||||
|
namespace MapControl
|
||||||
{
|
{
|
||||||
public partial class MapItem
|
public partial class MapItem
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
using Avalonia.Controls.Presenters;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Presenters;
|
||||||
using Avalonia.Controls.Templates;
|
using Avalonia.Controls.Templates;
|
||||||
|
using Avalonia.Input;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
|
|
@ -40,13 +43,13 @@ namespace MapControl
|
||||||
protected override void PrepareContainerForItemOverride(Control container, object item, int index)
|
protected override void PrepareContainerForItemOverride(Control container, object item, int index)
|
||||||
{
|
{
|
||||||
base.PrepareContainerForItemOverride(container, item, index);
|
base.PrepareContainerForItemOverride(container, item, index);
|
||||||
PrepareContainer(container, item);
|
PrepareContainer((MapItem)container, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ClearContainerForItemOverride(Control container)
|
protected override void ClearContainerForItemOverride(Control container)
|
||||||
{
|
{
|
||||||
base.ClearContainerForItemOverride(container);
|
base.ClearContainerForItemOverride(container);
|
||||||
ClearContainer(container);
|
ClearContainer((MapItem)container);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void UpdateSelection(MapItem mapItem, PointerEventArgs e)
|
internal void UpdateSelection(MapItem mapItem, PointerEventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
namespace MapControl
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
|
namespace MapControl
|
||||||
{
|
{
|
||||||
public partial class MapPanel
|
public partial class MapPanel
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using Avalonia.Controls.Shapes;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls.Shapes;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using System;
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
using System;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
using System;
|
using Avalonia;
|
||||||
|
using Avalonia.Animation;
|
||||||
|
using Avalonia.Styling;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using System;
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Threading;
|
||||||
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
namespace MapControl
|
using Avalonia;
|
||||||
|
|
||||||
|
namespace MapControl
|
||||||
{
|
{
|
||||||
public partial class ViewTransform
|
public partial class ViewTransform
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ using Windows.UI.Xaml;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
global using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer;
|
global using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
|
#elif AVALONIA
|
||||||
|
using DependencyObject = Avalonia.AvaloniaObject;
|
||||||
|
using Avalonia.Threading;
|
||||||
#endif
|
#endif
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
namespace MapControl
|
using System.IO;
|
||||||
|
|
||||||
|
namespace MapControl
|
||||||
{
|
{
|
||||||
public static class FilePath
|
public static class FilePath
|
||||||
{
|
{
|
||||||
public static string GetFullPath(string path)
|
public static string GetFullPath(string path)
|
||||||
{
|
{
|
||||||
#if NET6_0_OR_GREATER
|
#if NET6_0_OR_GREATER
|
||||||
return System.IO.Path.GetFullPath(path, System.AppDomain.CurrentDomain.BaseDirectory);
|
return Path.GetFullPath(path, System.AppDomain.CurrentDomain.BaseDirectory);
|
||||||
#else
|
#else
|
||||||
return System.IO.Path.GetFullPath(path);
|
return Path.GetFullPath(path);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,11 @@ using Microsoft.UI.Xaml.Media;
|
||||||
using Microsoft.UI.Xaml.Media.Imaging;
|
using Microsoft.UI.Xaml.Media.Imaging;
|
||||||
using Shape = Microsoft.UI.Xaml.Shapes.Shape;
|
using Shape = Microsoft.UI.Xaml.Shapes.Shape;
|
||||||
#elif AVALONIA
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
using Shape = Avalonia.Controls.Shapes.Shape;
|
using Shape = Avalonia.Controls.Shapes.Shape;
|
||||||
|
using BitmapSource = Avalonia.Media.Imaging.Bitmap;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
@ -43,6 +47,26 @@ namespace MapControl
|
||||||
LatLonBox = projection != null
|
LatLonBox = projection != null
|
||||||
? new LatLonBox(projection.MapToBoundingBox(new Rect(p1, p2)))
|
? new LatLonBox(projection.MapToBoundingBox(new Rect(p1, p2)))
|
||||||
: new LatLonBox(p1.Y, p1.X, p2.Y, p2.X);
|
: new LatLonBox(p1.Y, p1.X, p2.Y, p2.X);
|
||||||
|
|
||||||
|
#if DEBUG && NET6_0_OR_GREATER && !AVALONIA
|
||||||
|
System.Diagnostics.Debug.WriteLine(
|
||||||
|
string.Create(CultureInfo.InvariantCulture,
|
||||||
|
$"proj {projection?.CrsId ?? "-"}\n" +
|
||||||
|
$"SizeX {bitmap.PixelWidth}\n" +
|
||||||
|
$"SizeY {bitmap.PixelHeight}\n" +
|
||||||
|
$"M11 {transform.M11}\n" +
|
||||||
|
$"M22 {transform.M22}\n" +
|
||||||
|
$"OfsX {transform.OffsetX}\n" +
|
||||||
|
$"OfsY {transform.OffsetY}\n" +
|
||||||
|
$"X1 {p1.X}\n" +
|
||||||
|
$"Y1 {p1.Y}\n" +
|
||||||
|
$"X2 {p2.X}\n" +
|
||||||
|
$"Y2 {p2.Y}\n" +
|
||||||
|
$"West {LatLonBox.West}\n" +
|
||||||
|
$"South {LatLonBox.South}\n" +
|
||||||
|
$"East {LatLonBox.East}\n" +
|
||||||
|
$"North {LatLonBox.North}\n"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public BitmapSource BitmapSource { get; }
|
public BitmapSource BitmapSource { get; }
|
||||||
|
|
@ -119,7 +143,7 @@ namespace MapControl
|
||||||
|
|
||||||
private static async Task<GeoBitmap> LoadGeoBitmap(string sourcePath)
|
private static async Task<GeoBitmap> LoadGeoBitmap(string sourcePath)
|
||||||
{
|
{
|
||||||
var ext = Path.GetExtension(sourcePath);
|
var ext = System.IO.Path.GetExtension(sourcePath);
|
||||||
|
|
||||||
if (ext.Length >= 4)
|
if (ext.Length >= 4)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ using Windows.UI.Xaml.Media;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ using System.Windows;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia.Controls;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ using System.Windows;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,10 @@ using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using PathFigureCollection = Avalonia.Media.PathFigures;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@ using Windows.UI.Xaml.Media;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Threading;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,11 @@ using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,10 @@ using Windows.UI.Xaml.Data;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
@ -118,18 +122,18 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PrepareContainer(DependencyObject container, object item)
|
private void PrepareContainer(MapItem mapItem, object item)
|
||||||
{
|
{
|
||||||
if (LocationMemberPath != null && container is MapItem mapItem)
|
if (LocationMemberPath != null)
|
||||||
{
|
{
|
||||||
mapItem.SetBinding(MapItem.LocationProperty,
|
mapItem.SetBinding(MapItem.LocationProperty,
|
||||||
new Binding { Source = item, Path = new PropertyPath(LocationMemberPath) });
|
new Binding { Source = item, Path = new PropertyPath(LocationMemberPath) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClearContainer(DependencyObject container)
|
private void ClearContainer(MapItem mapItem)
|
||||||
{
|
{
|
||||||
if (LocationMemberPath != null && container is MapItem mapItem)
|
if (LocationMemberPath != null)
|
||||||
{
|
{
|
||||||
mapItem.ClearValue(MapItem.LocationProperty);
|
mapItem.ClearValue(MapItem.LocationProperty);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,11 @@ using Windows.Foundation;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Layout;
|
||||||
|
using Avalonia.Media;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ using System.Windows;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,12 @@ using Microsoft.UI.Xaml.Data;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
using Microsoft.UI.Xaml.Shapes;
|
using Microsoft.UI.Xaml.Shapes;
|
||||||
#elif AVALONIA
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.Shapes;
|
using Avalonia.Controls.Shapes;
|
||||||
|
using Avalonia.Data;
|
||||||
|
using Avalonia.Layout;
|
||||||
|
using PointCollection = System.Collections.Generic.List<Avalonia.Point>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ using Windows.UI.Xaml.Media;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Hosting;
|
using Microsoft.UI.Xaml.Hosting;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Threading;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ using Windows.UI.Xaml.Media;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Layout;
|
||||||
|
using Avalonia.Media;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ using System.Windows.Data;
|
||||||
using Windows.UI.Xaml.Data;
|
using Windows.UI.Xaml.Data;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia.Data.Converters;
|
||||||
#endif
|
#endif
|
||||||
#if UWP || WINUI
|
#if UWP || WINUI
|
||||||
using ConverterCulture = System.String;
|
using ConverterCulture = System.String;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ using System.Windows.Media;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ using Windows.UI.Xaml.Media;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ using System.Threading.Tasks;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ using Windows.UI.Xaml;
|
||||||
#elif WINUI
|
#elif WINUI
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,10 @@ using Windows.UI.Xaml.Media;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
#if WPF
|
#if WPF
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
#elif AVALONIA
|
||||||
|
using Avalonia;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,13 @@ namespace MapControl
|
||||||
protected override void PrepareContainerForItemOverride(DependencyObject container, object item)
|
protected override void PrepareContainerForItemOverride(DependencyObject container, object item)
|
||||||
{
|
{
|
||||||
base.PrepareContainerForItemOverride(container, item);
|
base.PrepareContainerForItemOverride(container, item);
|
||||||
PrepareContainer(container, item);
|
PrepareContainer((MapItem)container, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ClearContainerForItemOverride(DependencyObject container, object item)
|
protected override void ClearContainerForItemOverride(DependencyObject container, object item)
|
||||||
{
|
{
|
||||||
base.ClearContainerForItemOverride(container, item);
|
base.ClearContainerForItemOverride(container, item);
|
||||||
ClearContainer(container);
|
ClearContainer((MapItem)container);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,13 @@ namespace MapControl
|
||||||
protected override void PrepareContainerForItemOverride(DependencyObject container, object item)
|
protected override void PrepareContainerForItemOverride(DependencyObject container, object item)
|
||||||
{
|
{
|
||||||
base.PrepareContainerForItemOverride(container, item);
|
base.PrepareContainerForItemOverride(container, item);
|
||||||
PrepareContainer(container, item);
|
PrepareContainer((MapItem)container, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ClearContainerForItemOverride(DependencyObject container, object item)
|
protected override void ClearContainerForItemOverride(DependencyObject container, object item)
|
||||||
{
|
{
|
||||||
base.ClearContainerForItemOverride(container, item);
|
base.ClearContainerForItemOverride(container, item);
|
||||||
ClearContainer(container);
|
ClearContainer((MapItem)container);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue