Version 7.0: WinUI

This commit is contained in:
Clemens 2021-11-17 23:17:11 +01:00
parent 448f599d96
commit 9f61b90795
56 changed files with 94 additions and 81 deletions

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINUI || WINDOWS_UWP
#if WINUI || UWP
using Windows.Foundation;
#else
using System.Windows;

View file

@ -5,7 +5,7 @@
#if WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
#else

View file

@ -9,7 +9,7 @@ using System.Linq;
using System.Xml.Linq;
#if WINUI
using Microsoft.UI.Xaml;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
#else
using System.Windows;

View file

@ -10,7 +10,7 @@ namespace MapControl
/// <summary>
/// A geographic bounding box with south and north latitude and west and east longitude values in degrees.
/// </summary>
#if !WINDOWS_UWP
#if !UWP
[System.ComponentModel.TypeConverter(typeof(BoundingBoxConverter))]
#endif
public class BoundingBox

View file

@ -4,7 +4,7 @@
using System;
using System.Globalization;
#if WINUI || WINDOWS_UWP
#if WINUI || UWP
using Windows.Foundation;
#else
using System.Windows;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -11,7 +11,7 @@ using System.Threading.Tasks;
#if WINUI
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Imaging;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;
#else

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINUI || WINDOWS_UWP
#if WINUI || UWP
using Windows.Foundation;
#else
using System.Windows;

View file

@ -10,7 +10,7 @@ namespace MapControl
/// <summary>
/// A geographic location with latitude and longitude values in degrees.
/// </summary>
#if !WINDOWS_UWP
#if !UWP
[System.ComponentModel.TypeConverter(typeof(LocationConverter))]
#endif
public class Location : IEquatable<Location>

View file

@ -12,7 +12,7 @@ namespace MapControl
/// A collection of Locations with support for string parsing
/// and calculation of great circle and rhumb line locations.
/// </summary>
#if !WINDOWS_UWP
#if !UWP
[System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))]
#endif
public class LocationCollection : List<Location>

View file

@ -8,7 +8,7 @@ using Windows.Foundation;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Animation;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;

View file

@ -6,7 +6,7 @@ using System;
using System.Globalization;
#if WINUI
using Microsoft.UI.Xaml;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
#else
using System.Windows;

View file

@ -13,7 +13,7 @@ using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Animation;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

View file

@ -8,7 +8,7 @@ using Windows.Foundation;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Data;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

View file

@ -5,7 +5,7 @@
#if WINUI
using Microsoft.UI.Xaml.Media;
using Windows.UI.Text;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Text;
using Windows.UI.Xaml.Media;
#else

View file

@ -9,7 +9,7 @@ using Windows.Foundation;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

View file

@ -5,7 +5,7 @@
#if WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
#else

View file

@ -7,7 +7,7 @@ using System.Linq;
#if WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
#else
@ -29,7 +29,7 @@ namespace MapControl
/// <summary>
/// Gets or sets the Locations that define the polygon points.
/// </summary>
#if !WINDOWS_UWP
#if !UWP
[System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))]
#endif
public IEnumerable<Location> Locations

View file

@ -7,7 +7,7 @@ using System.Linq;
#if WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
#else
@ -29,7 +29,7 @@ namespace MapControl
/// <summary>
/// Gets or sets the Locations that define the polyline points.
/// </summary>
#if !WINDOWS_UWP
#if !UWP
[System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))]
#endif
public IEnumerable<Location> Locations

View file

@ -4,7 +4,7 @@
using System;
using System.Globalization;
#if WINUI || WINDOWS_UWP
#if WINUI || UWP
using Windows.Foundation;
#else
using System.Windows;

View file

@ -10,7 +10,7 @@ using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Shapes;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@ -48,7 +48,7 @@ namespace MapControl
line.SetBinding(Shape.StrokeProperty, this.GetBinding(nameof(Stroke)));
line.SetBinding(Shape.StrokeThicknessProperty, this.GetBinding(nameof(StrokeThickness)));
#if WINUI || WINDOWS_UWP
#if WINUI || UWP
label.SetBinding(TextBlock.ForegroundProperty, this.GetBinding(nameof(Foreground)));
#endif
Children.Add(line);

View file

@ -10,7 +10,7 @@ using System.Threading.Tasks;
using Windows.Foundation;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;

View file

@ -10,7 +10,7 @@ using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
@ -75,7 +75,7 @@ namespace MapControl
updateTimer.Interval = UpdateInterval;
updateTimer.Tick += async (s, e) => await Update();
#if WINUI || WINDOWS_UWP
#if WINUI || UWP
MapPanel.InitMapElement(this);
#endif
}

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -7,7 +7,7 @@ using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Animation;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

View file

@ -6,7 +6,7 @@ using System;
using System.Threading.Tasks;
#if WINUI
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.UI.Xaml.Media;
#else
using System.Windows.Media;
@ -17,7 +17,7 @@ namespace MapControl
/// <summary>
/// Provides the download Uri or ImageSource of map tiles.
/// </summary>
#if !WINDOWS_UWP
#if !UWP
[System.ComponentModel.TypeConverter(typeof(TileSourceConverter))]
#endif
public class TileSource

View file

@ -6,7 +6,7 @@ using System;
#if WINUI
using Windows.Foundation;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml.Media;
#else

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -12,7 +12,7 @@ using System.Xml.Linq;
using Windows.Foundation;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;

View file

@ -8,7 +8,7 @@ using System.Globalization;
using System.Linq;
using System.Xml.Linq;
using System.Threading.Tasks;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -10,7 +10,7 @@ using System.Threading.Tasks;
#if WINUI
using Windows.Foundation;
using Microsoft.UI.Xaml;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml;
#else

View file

@ -2,7 +2,7 @@
// © 2021 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif

View file

@ -9,7 +9,7 @@ using System.Linq;
using Windows.Foundation;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
#elif WINDOWS_UWP
#elif UWP
using Windows.Foundation;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

View file

@ -3,7 +3,7 @@
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if !WINUI && !WINDOWS_UWP
#if !WINUI && !UWP
using System.Windows;
#endif