diff --git a/MBTiles/Shared/MBTileLayer.cs b/MBTiles/Shared/MBTileLayer.cs index 5ce0c4b2..233c406e 100644 --- a/MBTiles/Shared/MBTileLayer.cs +++ b/MBTiles/Shared/MBTileLayer.cs @@ -3,12 +3,12 @@ // Licensed under the Microsoft Public License (Ms-PL) using System.Threading.Tasks; -#if WINUI -using Microsoft.UI.Xaml; +#if WPF +using System.Windows; #elif UWP using Windows.UI.Xaml; -#else -using System.Windows; +#elif WINUI +using Microsoft.UI.Xaml; #endif namespace MapControl.MBTiles diff --git a/MBTiles/Shared/MBTileSource.cs b/MBTiles/Shared/MBTileSource.cs index 8fdafbd9..bbc0dbb2 100644 --- a/MBTiles/Shared/MBTileSource.cs +++ b/MBTiles/Shared/MBTileSource.cs @@ -5,12 +5,12 @@ using System; using System.Diagnostics; using System.Threading.Tasks; -#if WINUI -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows.Media; #elif UWP using Windows.UI.Xaml.Media; -#else -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml.Media; #endif namespace MapControl.MBTiles diff --git a/MBTiles/WPF/MBTiles.WPF.csproj b/MBTiles/WPF/MBTiles.WPF.csproj index d402fcfc..23800f8a 100644 --- a/MBTiles/WPF/MBTiles.WPF.csproj +++ b/MBTiles/WPF/MBTiles.WPF.csproj @@ -13,7 +13,7 @@ false false XAML.MapControl.MBTiles - + WPF diff --git a/MapControl/Shared/AutoEquirectangularProjection.cs b/MapControl/Shared/AutoEquirectangularProjection.cs index 57bcb735..55613596 100644 --- a/MapControl/Shared/AutoEquirectangularProjection.cs +++ b/MapControl/Shared/AutoEquirectangularProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/AzimuthalEquidistantProjection.cs b/MapControl/Shared/AzimuthalEquidistantProjection.cs index 6c5e278d..96cba54c 100644 --- a/MapControl/Shared/AzimuthalEquidistantProjection.cs +++ b/MapControl/Shared/AzimuthalEquidistantProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/AzimuthalProjection.cs b/MapControl/Shared/AzimuthalProjection.cs index 6d1de9a2..2d4ba2ad 100644 --- a/MapControl/Shared/AzimuthalProjection.cs +++ b/MapControl/Shared/AzimuthalProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/BindingHelper.cs b/MapControl/Shared/BindingHelper.cs index a17c8523..5827242d 100644 --- a/MapControl/Shared/BindingHelper.cs +++ b/MapControl/Shared/BindingHelper.cs @@ -2,15 +2,15 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Data; +#if WPF +using System.Windows; +using System.Windows.Data; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Data; -#else -using System.Windows; -using System.Windows.Data; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Data; #endif namespace MapControl diff --git a/MapControl/Shared/BingMapsTileLayer.cs b/MapControl/Shared/BingMapsTileLayer.cs index ba6c859e..b7334dd4 100644 --- a/MapControl/Shared/BingMapsTileLayer.cs +++ b/MapControl/Shared/BingMapsTileLayer.cs @@ -7,12 +7,12 @@ using System.Diagnostics; using System.Globalization; using System.Linq; using System.Xml.Linq; -#if WINUI -using Microsoft.UI.Xaml; +#if WPF +using System.Windows; #elif UWP using Windows.UI.Xaml; -#else -using System.Windows; +#elif WINUI +using Microsoft.UI.Xaml; #endif namespace MapControl diff --git a/MapControl/Shared/BoundingBox.cs b/MapControl/Shared/BoundingBox.cs index 9063e928..bbc2c0fe 100644 --- a/MapControl/Shared/BoundingBox.cs +++ b/MapControl/Shared/BoundingBox.cs @@ -10,7 +10,7 @@ namespace MapControl /// /// A geographic bounding box with south and north latitude and west and east longitude values in degrees. /// -#if WINUI || UWP +#if UWP || WINUI [Windows.Foundation.Metadata.CreateFromString(MethodName = "Parse")] #else [System.ComponentModel.TypeConverter(typeof(BoundingBoxConverter))] diff --git a/MapControl/Shared/BoundingBoxTileSource.cs b/MapControl/Shared/BoundingBoxTileSource.cs index 49862311..1444db03 100644 --- a/MapControl/Shared/BoundingBoxTileSource.cs +++ b/MapControl/Shared/BoundingBoxTileSource.cs @@ -5,12 +5,12 @@ using System; using System.Globalization; using System.Threading.Tasks; -#if WINUI -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows.Media; #elif UWP using Windows.UI.Xaml.Media; -#else -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/EquirectangularProjection.cs b/MapControl/Shared/EquirectangularProjection.cs index 770391d1..f2a4e415 100644 --- a/MapControl/Shared/EquirectangularProjection.cs +++ b/MapControl/Shared/EquirectangularProjection.cs @@ -4,7 +4,7 @@ using System; using System.Globalization; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/GeoImage.cs b/MapControl/Shared/GeoImage.cs index 07900e10..07857366 100644 --- a/MapControl/Shared/GeoImage.cs +++ b/MapControl/Shared/GeoImage.cs @@ -7,21 +7,21 @@ using System.Globalization; using System.IO; using System.Linq; using System.Threading.Tasks; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Media.Imaging; +#if WPF +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Imaging; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Media.Imaging; -#else -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Media.Imaging; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Media.Imaging; #endif namespace MapControl diff --git a/MapControl/Shared/GnomonicProjection.cs b/MapControl/Shared/GnomonicProjection.cs index b070f64a..7f9c5cb5 100644 --- a/MapControl/Shared/GnomonicProjection.cs +++ b/MapControl/Shared/GnomonicProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/GroundOverlay.cs b/MapControl/Shared/GroundOverlay.cs index 0d8ab77b..2057c2c8 100644 --- a/MapControl/Shared/GroundOverlay.cs +++ b/MapControl/Shared/GroundOverlay.cs @@ -11,18 +11,18 @@ using System.IO.Compression; using System.Linq; using System.Threading.Tasks; using System.Xml; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/ImageLoader.cs b/MapControl/Shared/ImageLoader.cs index 9ad54366..7c0ed060 100644 --- a/MapControl/Shared/ImageLoader.cs +++ b/MapControl/Shared/ImageLoader.cs @@ -9,14 +9,14 @@ using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -#if AVALONIA -using ImageSource = Avalonia.Media.IImage; -#elif WINUI -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows.Media; #elif UWP using Windows.UI.Xaml.Media; -#else -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml.Media; +#elif AVALONIA +using ImageSource = Avalonia.Media.IImage; #endif namespace MapControl diff --git a/MapControl/Shared/Intersections.cs b/MapControl/Shared/Intersections.cs index 4d974909..e6f14d76 100644 --- a/MapControl/Shared/Intersections.cs +++ b/MapControl/Shared/Intersections.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/Location.cs b/MapControl/Shared/Location.cs index 59b6c761..e0e37c82 100644 --- a/MapControl/Shared/Location.cs +++ b/MapControl/Shared/Location.cs @@ -10,7 +10,7 @@ namespace MapControl /// /// A geographic location with latitude and longitude values in degrees. /// -#if WINUI || UWP +#if UWP || WINUI [Windows.Foundation.Metadata.CreateFromString(MethodName = "Parse")] #else [System.ComponentModel.TypeConverter(typeof(LocationConverter))] diff --git a/MapControl/Shared/LocationCollection.cs b/MapControl/Shared/LocationCollection.cs index ccd4b423..7f8fa0df 100644 --- a/MapControl/Shared/LocationCollection.cs +++ b/MapControl/Shared/LocationCollection.cs @@ -12,7 +12,7 @@ namespace MapControl /// A collection of Locations with support for string parsing /// and calculation of great circle and rhumb line locations. /// -#if WINUI || UWP +#if UWP || WINUI [Windows.Foundation.Metadata.CreateFromString(MethodName = "Parse")] #else [System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))] diff --git a/MapControl/Shared/MapBase.cs b/MapControl/Shared/MapBase.cs index 26a33048..999ac1a4 100644 --- a/MapControl/Shared/MapBase.cs +++ b/MapControl/Shared/MapBase.cs @@ -3,21 +3,21 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if AVALONIA -using Avalonia.Media; -using DependencyProperty = Avalonia.AvaloniaProperty; -using UIElement = Avalonia.Controls.Control; -#elif WINUI -using Microsoft.UI; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.UI; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; +#elif AVALONIA +using Avalonia.Media; +using DependencyProperty = Avalonia.AvaloniaProperty; +using UIElement = Avalonia.Controls.Control; #endif namespace MapControl diff --git a/MapControl/Shared/MapBorderPanel.cs b/MapControl/Shared/MapBorderPanel.cs index 55e9c303..932cbf17 100644 --- a/MapControl/Shared/MapBorderPanel.cs +++ b/MapControl/Shared/MapBorderPanel.cs @@ -2,12 +2,12 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI.Xaml; +#if WPF +using System.Windows; #elif UWP using Windows.UI.Xaml; -#else -using System.Windows; +#elif WINUI +using Microsoft.UI.Xaml; #endif namespace MapControl diff --git a/MapControl/Shared/MapGraticule.cs b/MapControl/Shared/MapGraticule.cs index a743ee70..7c68b81f 100644 --- a/MapControl/Shared/MapGraticule.cs +++ b/MapControl/Shared/MapGraticule.cs @@ -6,17 +6,15 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -#if WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; -#elif UWP -using Windows.Foundation; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Media; -#else +#if WPF using System.Windows; using System.Windows.Media; +#elif UWP +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/MapImageLayer.cs b/MapControl/Shared/MapImageLayer.cs index 13333e9e..884e0b8f 100644 --- a/MapControl/Shared/MapImageLayer.cs +++ b/MapControl/Shared/MapImageLayer.cs @@ -6,28 +6,26 @@ using System; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; -#if AVALONIA +#if WPF +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Threading; +#elif UWP +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Media; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer; +#elif AVALONIA using Avalonia.Controls; using Avalonia.Media; using Avalonia.Threading; using DependencyProperty = Avalonia.AvaloniaProperty; using ImageSource = Avalonia.Media.IImage; -#elif WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; -using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer; -#elif UWP -using Windows.Foundation; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Threading; #endif namespace MapControl diff --git a/MapControl/Shared/MapItem.cs b/MapControl/Shared/MapItem.cs index ee9b1ceb..66fffa9c 100644 --- a/MapControl/Shared/MapItem.cs +++ b/MapControl/Shared/MapItem.cs @@ -2,15 +2,15 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows.Controls; +using System.Windows.Media; #elif UWP using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; -#else -using System.Windows.Controls; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/MapItemsControl.cs b/MapControl/Shared/MapItemsControl.cs index dab2c268..2d84370d 100644 --- a/MapControl/Shared/MapItemsControl.cs +++ b/MapControl/Shared/MapItemsControl.cs @@ -3,20 +3,18 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Data; -#elif UWP -using Windows.Foundation; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Data; -#else +#if WPF using System.Windows; using System.Windows.Controls; using System.Windows.Data; +#elif UWP +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Data; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; #endif namespace MapControl diff --git a/MapControl/Shared/MapOverlay.cs b/MapControl/Shared/MapOverlay.cs index f10199a2..30273023 100644 --- a/MapControl/Shared/MapOverlay.cs +++ b/MapControl/Shared/MapOverlay.cs @@ -2,15 +2,15 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI.Xaml.Media; -using Windows.UI.Text; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.UI.Text; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml.Media; +using Windows.UI.Text; #endif namespace MapControl diff --git a/MapControl/Shared/MapPanel.cs b/MapControl/Shared/MapPanel.cs index 4d9f4db7..e99d29ea 100644 --- a/MapControl/Shared/MapPanel.cs +++ b/MapControl/Shared/MapPanel.cs @@ -2,28 +2,27 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -using System; -#if AVALONIA +#if WPF +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +#elif UWP +using Windows.Foundation; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Media; +#elif WINUI +using Windows.Foundation; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +#elif AVALONIA using Avalonia.Controls; using Avalonia.Media; using DependencyProperty = Avalonia.AvaloniaProperty; using FrameworkElement = Avalonia.Controls.Control; using HorizontalAlignment = Avalonia.Layout.HorizontalAlignment; using VerticalAlignment = Avalonia.Layout.VerticalAlignment; -#elif WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; -#elif UWP -using Windows.Foundation; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; #endif /// diff --git a/MapControl/Shared/MapPath.cs b/MapControl/Shared/MapPath.cs index aba111f7..42aa5a8f 100644 --- a/MapControl/Shared/MapPath.cs +++ b/MapControl/Shared/MapPath.cs @@ -4,16 +4,15 @@ using System.Collections.Generic; using System.Linq; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Shapes; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/MapPolygon.cs b/MapControl/Shared/MapPolygon.cs index 04232d26..86931920 100644 --- a/MapControl/Shared/MapPolygon.cs +++ b/MapControl/Shared/MapPolygon.cs @@ -3,15 +3,15 @@ // Licensed under the Microsoft Public License (Ms-PL) using System.Collections.Generic; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl @@ -32,7 +32,7 @@ namespace MapControl /// /// Gets or sets the Locations that define the polygon points. /// -#if !WINUI && !UWP +#if WPF [System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))] #endif public IEnumerable Locations diff --git a/MapControl/Shared/MapPolyline.cs b/MapControl/Shared/MapPolyline.cs index 7a5fb6fe..a8705d62 100644 --- a/MapControl/Shared/MapPolyline.cs +++ b/MapControl/Shared/MapPolyline.cs @@ -3,15 +3,15 @@ // Licensed under the Microsoft Public License (Ms-PL) using System.Collections.Generic; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl @@ -32,7 +32,7 @@ namespace MapControl /// /// Gets or sets the Locations that define the polyline points. /// -#if !WINUI && !UWP +#if WPF [System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))] #endif public IEnumerable Locations diff --git a/MapControl/Shared/MapProjection.cs b/MapControl/Shared/MapProjection.cs index 80f8f94d..86679dbc 100644 --- a/MapControl/Shared/MapProjection.cs +++ b/MapControl/Shared/MapProjection.cs @@ -4,7 +4,7 @@ using System; using System.Globalization; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/MapScale.cs b/MapControl/Shared/MapScale.cs index acdfffbb..ae16dd84 100644 --- a/MapControl/Shared/MapScale.cs +++ b/MapControl/Shared/MapScale.cs @@ -4,23 +4,23 @@ using System; using System.Globalization; -#if WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Shapes; +#if WPF +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Shapes; #elif UWP using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Shapes; -#else -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Shapes; +#elif WINUI +using Windows.Foundation; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Shapes; #endif namespace MapControl @@ -56,7 +56,7 @@ namespace MapControl line.SetBinding(Shape.StrokeProperty, this.GetOrCreateBinding(StrokeProperty, nameof(Stroke))); line.SetBinding(Shape.StrokeThicknessProperty, this.GetOrCreateBinding(StrokeThicknessProperty, nameof(StrokeThickness))); -#if WINUI || UWP +#if UWP || WINUI label.SetBinding(TextBlock.ForegroundProperty, this.GetOrCreateBinding(ForegroundProperty, nameof(Foreground))); #endif } diff --git a/MapControl/Shared/MapTileLayer.cs b/MapControl/Shared/MapTileLayer.cs index c8beb995..0e2d92c9 100644 --- a/MapControl/Shared/MapTileLayer.cs +++ b/MapControl/Shared/MapTileLayer.cs @@ -4,20 +4,20 @@ using System; using System.Threading.Tasks; -#if AVALONIA -using Avalonia.Media; -using DependencyProperty = Avalonia.AvaloniaProperty; -#elif WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Windows.Foundation; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; +#elif AVALONIA +using Avalonia.Media; +using DependencyProperty = Avalonia.AvaloniaProperty; #endif namespace MapControl diff --git a/MapControl/Shared/MapTileLayerBase.cs b/MapControl/Shared/MapTileLayerBase.cs index b4325c4a..6f945e54 100644 --- a/MapControl/Shared/MapTileLayerBase.cs +++ b/MapControl/Shared/MapTileLayerBase.cs @@ -5,25 +5,25 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -#if AVALONIA -using Avalonia.Controls; -using Avalonia.Media; -using Avalonia.Threading; -using DependencyProperty = Avalonia.AvaloniaProperty; +#if WPF +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Threading; +#elif UWP +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Media; #elif WINUI using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; using DispatcherTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer; -#elif UWP -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Threading; +#elif AVALONIA +using Avalonia.Controls; +using Avalonia.Media; +using Avalonia.Threading; +using DependencyProperty = Avalonia.AvaloniaProperty; #endif namespace MapControl @@ -72,7 +72,7 @@ namespace MapControl updateTimer = this.CreateTimer(UpdateInterval); updateTimer.Tick += async (s, e) => await Update(false); -#if WINUI || UWP +#if UWP || WINUI MapPanel.InitMapElement(this); #endif } diff --git a/MapControl/Shared/OrthographicProjection.cs b/MapControl/Shared/OrthographicProjection.cs index 3aaec51d..1b58dc2b 100644 --- a/MapControl/Shared/OrthographicProjection.cs +++ b/MapControl/Shared/OrthographicProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/PolarStereographicProjection.cs b/MapControl/Shared/PolarStereographicProjection.cs index 10db0bde..6b205ecf 100644 --- a/MapControl/Shared/PolarStereographicProjection.cs +++ b/MapControl/Shared/PolarStereographicProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/PushpinBorder.cs b/MapControl/Shared/PushpinBorder.cs index 9da9e8ef..3097e607 100644 --- a/MapControl/Shared/PushpinBorder.cs +++ b/MapControl/Shared/PushpinBorder.cs @@ -3,17 +3,17 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Windows.Foundation; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/StereographicProjection.cs b/MapControl/Shared/StereographicProjection.cs index 3b358f67..be92f845 100644 --- a/MapControl/Shared/StereographicProjection.cs +++ b/MapControl/Shared/StereographicProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/Tile.cs b/MapControl/Shared/Tile.cs index 35b3a5ef..df712e71 100644 --- a/MapControl/Shared/Tile.cs +++ b/MapControl/Shared/Tile.cs @@ -3,19 +3,19 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if AVALONIA -using Avalonia.Controls; -using Avalonia.Media; -using ImageSource = Avalonia.Media.IImage; -#elif WINUI -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows.Controls; +using System.Windows.Media; #elif UWP using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; -#else -using System.Windows.Controls; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +#elif AVALONIA +using Avalonia.Controls; +using Avalonia.Media; +using ImageSource = Avalonia.Media.IImage; #endif namespace MapControl diff --git a/MapControl/Shared/TileSource.cs b/MapControl/Shared/TileSource.cs index 84c6fb75..86e80149 100644 --- a/MapControl/Shared/TileSource.cs +++ b/MapControl/Shared/TileSource.cs @@ -4,14 +4,14 @@ using System; using System.Threading.Tasks; -#if AVALONIA -using ImageSource = Avalonia.Media.IImage; -#elif WINUI -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows.Media; #elif UWP using Windows.UI.Xaml.Media; -#else -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml.Media; +#elif AVALONIA +using ImageSource = Avalonia.Media.IImage; #endif namespace MapControl @@ -19,7 +19,7 @@ namespace MapControl /// /// Provides the download Uri or ImageSource of map tiles. /// -#if WINUI || UWP +#if UWP || WINUI [Windows.Foundation.Metadata.CreateFromString(MethodName = "Parse")] #else [System.ComponentModel.TypeConverter(typeof(TileSourceConverter))] diff --git a/MapControl/Shared/TransverseMercatorProjection.cs b/MapControl/Shared/TransverseMercatorProjection.cs index 61b821dd..75db50bd 100644 --- a/MapControl/Shared/TransverseMercatorProjection.cs +++ b/MapControl/Shared/TransverseMercatorProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/ViewRect.cs b/MapControl/Shared/ViewRect.cs index d60341cb..7eaa388d 100644 --- a/MapControl/Shared/ViewRect.cs +++ b/MapControl/Shared/ViewRect.cs @@ -2,7 +2,7 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/ViewTransform.cs b/MapControl/Shared/ViewTransform.cs index 9025a794..e792a4d5 100644 --- a/MapControl/Shared/ViewTransform.cs +++ b/MapControl/Shared/ViewTransform.cs @@ -3,15 +3,15 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.Foundation; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Windows.Foundation; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/WebMercatorProjection.cs b/MapControl/Shared/WebMercatorProjection.cs index 90602a9f..5fa114ce 100644 --- a/MapControl/Shared/WebMercatorProjection.cs +++ b/MapControl/Shared/WebMercatorProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/WmsImageLayer.cs b/MapControl/Shared/WmsImageLayer.cs index bbba0d3d..2c7ef8c6 100644 --- a/MapControl/Shared/WmsImageLayer.cs +++ b/MapControl/Shared/WmsImageLayer.cs @@ -8,18 +8,18 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using System.Xml.Linq; -#if AVALONIA -using DependencyProperty = Avalonia.AvaloniaProperty; -using ImageSource = Avalonia.Media.IImage; -#elif WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Media; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Media; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; +#elif AVALONIA +using DependencyProperty = Avalonia.AvaloniaProperty; +using ImageSource = Avalonia.Media.IImage; #endif namespace MapControl diff --git a/MapControl/Shared/WmtsCapabilities.cs b/MapControl/Shared/WmtsCapabilities.cs index 99c95f5c..e19cc3d3 100644 --- a/MapControl/Shared/WmtsCapabilities.cs +++ b/MapControl/Shared/WmtsCapabilities.cs @@ -8,7 +8,7 @@ using System.Globalization; using System.Linq; using System.Threading.Tasks; using System.Xml.Linq; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/WmtsTileLayer.cs b/MapControl/Shared/WmtsTileLayer.cs index b8d3c7e8..851a5770 100644 --- a/MapControl/Shared/WmtsTileLayer.cs +++ b/MapControl/Shared/WmtsTileLayer.cs @@ -7,14 +7,14 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; -#if WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml; +#if WPF +using System.Windows; #elif UWP using Windows.Foundation; using Windows.UI.Xaml; -#else -using System.Windows; +#elif WINUI +using Windows.Foundation; +using Microsoft.UI.Xaml; #endif namespace MapControl diff --git a/MapControl/Shared/WmtsTileMatrix.cs b/MapControl/Shared/WmtsTileMatrix.cs index 9933d588..4d3270ff 100644 --- a/MapControl/Shared/WmtsTileMatrix.cs +++ b/MapControl/Shared/WmtsTileMatrix.cs @@ -2,7 +2,7 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/Shared/WmtsTileMatrixLayer.cs b/MapControl/Shared/WmtsTileMatrixLayer.cs index 1d37ff68..ba774c1c 100644 --- a/MapControl/Shared/WmtsTileMatrixLayer.cs +++ b/MapControl/Shared/WmtsTileMatrixLayer.cs @@ -3,18 +3,18 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINUI -using Windows.Foundation; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; +#if WPF +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; #elif UWP using Windows.Foundation; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; -#else -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; +#elif WINUI +using Windows.Foundation; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/Shared/WorldMercatorProjection.cs b/MapControl/Shared/WorldMercatorProjection.cs index 1aefac77..133ffb9e 100644 --- a/MapControl/Shared/WorldMercatorProjection.cs +++ b/MapControl/Shared/WorldMercatorProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapControl/WPF/MapControl.WPF.csproj b/MapControl/WPF/MapControl.WPF.csproj index a4e28f2c..70495ce6 100644 --- a/MapControl/WPF/MapControl.WPF.csproj +++ b/MapControl/WPF/MapControl.WPF.csproj @@ -13,7 +13,7 @@ false false XAML.MapControl - + WPF diff --git a/MapControl/WPF/Timer.WPF.cs b/MapControl/WPF/Timer.WPF.cs index 10a64c79..2f6f790c 100644 --- a/MapControl/WPF/Timer.WPF.cs +++ b/MapControl/WPF/Timer.WPF.cs @@ -3,12 +3,12 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if AVALONIA -using Avalonia.Threading; +#if WPF +using System.Windows.Threading; #elif UWP using Windows.UI.Xaml; -#else -using System.Windows.Threading; +#elif AVALONIA +using Avalonia.Threading; #endif namespace MapControl diff --git a/MapControl/WinUI/DependencyPropertyHelper.WinUI.cs b/MapControl/WinUI/DependencyPropertyHelper.WinUI.cs index fb0cffa4..81a7dea4 100644 --- a/MapControl/WinUI/DependencyPropertyHelper.WinUI.cs +++ b/MapControl/WinUI/DependencyPropertyHelper.WinUI.cs @@ -3,10 +3,10 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINUI -using Microsoft.UI.Xaml; -#else +#if UWP using Windows.UI.Xaml; +#else +using Microsoft.UI.Xaml; #endif #pragma warning disable IDE0060 // Remove unused parameter diff --git a/MapControl/WinUI/ImageLoader.WinUI.cs b/MapControl/WinUI/ImageLoader.WinUI.cs index 9f3c3467..fc62c5da 100644 --- a/MapControl/WinUI/ImageLoader.WinUI.cs +++ b/MapControl/WinUI/ImageLoader.WinUI.cs @@ -9,12 +9,12 @@ using System.Threading.Tasks; using Windows.Graphics.Imaging; using Windows.Storage; using Windows.Storage.Streams; -#if WINUI -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Media.Imaging; -#else +#if UWP using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Media.Imaging; +#else +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Media.Imaging; #endif namespace MapControl diff --git a/MapControl/WinUI/Map.WinUI.cs b/MapControl/WinUI/Map.WinUI.cs index 32ca00e6..a264362f 100644 --- a/MapControl/WinUI/Map.WinUI.cs +++ b/MapControl/WinUI/Map.WinUI.cs @@ -4,14 +4,14 @@ using System; using Windows.System; -#if WINUI -using Microsoft.UI.Input; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Input; -#else +#if UWP using Windows.Devices.Input; using Windows.UI.Xaml; using Windows.UI.Xaml.Input; +#else +using Microsoft.UI.Input; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Input; #endif namespace MapControl diff --git a/MapControl/WinUI/MapBase.WinUI.cs b/MapControl/WinUI/MapBase.WinUI.cs index bde1ccf5..8778867d 100644 --- a/MapControl/WinUI/MapBase.WinUI.cs +++ b/MapControl/WinUI/MapBase.WinUI.cs @@ -2,16 +2,16 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Media.Animation; -#else +#if UWP using Windows.UI; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Media.Animation; +#else +using Microsoft.UI; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Media.Animation; #endif namespace MapControl diff --git a/MapControl/WinUI/MapContentControl.WinUI.cs b/MapControl/WinUI/MapContentControl.WinUI.cs index 872286c2..4e545b63 100644 --- a/MapControl/WinUI/MapContentControl.WinUI.cs +++ b/MapControl/WinUI/MapContentControl.WinUI.cs @@ -2,12 +2,12 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -#else +#if UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; +#else +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; #endif namespace MapControl diff --git a/MapControl/WinUI/MapGraticule.WinUI.cs b/MapControl/WinUI/MapGraticule.WinUI.cs index c2c0f3c8..6e1af432 100644 --- a/MapControl/WinUI/MapGraticule.WinUI.cs +++ b/MapControl/WinUI/MapGraticule.WinUI.cs @@ -5,14 +5,14 @@ using Windows.Foundation; using System.Collections.Generic; using System.Linq; -#if WINUI -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Shapes; -#else +#if UWP using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Shapes; +#else +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Shapes; #endif namespace MapControl diff --git a/MapControl/WinUI/MapItem.WinUI.cs b/MapControl/WinUI/MapItem.WinUI.cs index ec57a0dc..1b90b0d0 100644 --- a/MapControl/WinUI/MapItem.WinUI.cs +++ b/MapControl/WinUI/MapItem.WinUI.cs @@ -3,14 +3,14 @@ // Licensed under the Microsoft Public License (Ms-PL) using Windows.System; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Input; -#else +#if UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Input; +#else +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Input; #endif namespace MapControl diff --git a/MapControl/WinUI/MapItemsControl.WinUI.cs b/MapControl/WinUI/MapItemsControl.WinUI.cs index f97c09fa..af85f84e 100644 --- a/MapControl/WinUI/MapItemsControl.WinUI.cs +++ b/MapControl/WinUI/MapItemsControl.WinUI.cs @@ -2,10 +2,10 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI.Xaml; -#else +#if UWP using Windows.UI.Xaml; +#else +using Microsoft.UI.Xaml; #endif namespace MapControl diff --git a/MapControl/WinUI/MapOverlay.WinUI.cs b/MapControl/WinUI/MapOverlay.WinUI.cs index 5530ecc6..e0349f0f 100644 --- a/MapControl/WinUI/MapOverlay.WinUI.cs +++ b/MapControl/WinUI/MapOverlay.WinUI.cs @@ -2,15 +2,14 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI +using Windows.UI.Text; +#if UWP +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media; +#else using Microsoft.UI.Text; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Media; -using Windows.UI.Text; -#else -using Windows.UI.Text; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/WinUI/MapPanel.WinUI.cs b/MapControl/WinUI/MapPanel.WinUI.cs index 8edeedc0..2bbefd18 100644 --- a/MapControl/WinUI/MapPanel.WinUI.cs +++ b/MapControl/WinUI/MapPanel.WinUI.cs @@ -4,12 +4,12 @@ using System.Collections.Generic; using System.Linq; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; -#else +#if UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media; +#else +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; #endif namespace MapControl diff --git a/MapControl/WinUI/MapPath.WinUI.cs b/MapControl/WinUI/MapPath.WinUI.cs index 13a206d6..e41faa51 100644 --- a/MapControl/WinUI/MapPath.WinUI.cs +++ b/MapControl/WinUI/MapPath.WinUI.cs @@ -5,15 +5,14 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; -using Windows.Foundation; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Shapes; -#else +#if UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Shapes; +#else +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Shapes; #endif namespace MapControl diff --git a/MapControl/WinUI/Matrix.WinUI.cs b/MapControl/WinUI/Matrix.WinUI.cs index 2d4781a3..8ab5ae51 100644 --- a/MapControl/WinUI/Matrix.WinUI.cs +++ b/MapControl/WinUI/Matrix.WinUI.cs @@ -3,10 +3,10 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if WINUI -using WindowsUI = Microsoft.UI; -#else +#if UWP using WindowsUI = Windows.UI; +#else +using WindowsUI = Microsoft.UI; #endif namespace MapControl diff --git a/MapControl/WinUI/OpacityHelper.WinUI.cs b/MapControl/WinUI/OpacityHelper.WinUI.cs index 9bfed25c..56feaafd 100644 --- a/MapControl/WinUI/OpacityHelper.WinUI.cs +++ b/MapControl/WinUI/OpacityHelper.WinUI.cs @@ -4,12 +4,12 @@ using System; using System.Threading.Tasks; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media.Animation; -#else +#if UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media.Animation; +#else +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media.Animation; #endif namespace MapControl diff --git a/MapControl/WinUI/PushpinBorder.WinUI.cs b/MapControl/WinUI/PushpinBorder.WinUI.cs index fd2ce312..32baf5fb 100644 --- a/MapControl/WinUI/PushpinBorder.WinUI.cs +++ b/MapControl/WinUI/PushpinBorder.WinUI.cs @@ -3,20 +3,20 @@ // Licensed under the Microsoft Public License (Ms-PL) using Windows.Foundation; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Data; -using Microsoft.UI.Xaml.Markup; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Shapes; -#else +#if UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Markup; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Shapes; +#else +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Markup; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Shapes; #endif namespace MapControl diff --git a/MapControl/WinUI/Tile.WinUI.cs b/MapControl/WinUI/Tile.WinUI.cs index 7bfc84d8..a42b8013 100644 --- a/MapControl/WinUI/Tile.WinUI.cs +++ b/MapControl/WinUI/Tile.WinUI.cs @@ -2,14 +2,14 @@ // Copyright © 2024 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Media.Animation; -using Microsoft.UI.Xaml.Media.Imaging; -#else +#if UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Media.Animation; using Windows.UI.Xaml.Media.Imaging; +#else +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media.Animation; +using Microsoft.UI.Xaml.Media.Imaging; #endif namespace MapControl diff --git a/MapProjections/Shared/GeoApiProjection.cs b/MapProjections/Shared/GeoApiProjection.cs index d44a7336..4d4f39ee 100644 --- a/MapProjections/Shared/GeoApiProjection.cs +++ b/MapProjections/Shared/GeoApiProjection.cs @@ -8,7 +8,7 @@ using GeoAPI.Geometries; using ProjNet.CoordinateSystems; using ProjNet.CoordinateSystems.Transformations; using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapProjections/Shared/WebMercatorProjection.cs b/MapProjections/Shared/WebMercatorProjection.cs index dbcba0d0..a2812e45 100644 --- a/MapProjections/Shared/WebMercatorProjection.cs +++ b/MapProjections/Shared/WebMercatorProjection.cs @@ -4,7 +4,7 @@ using ProjNet.CoordinateSystems; using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapProjections/Shared/WorldMercatorProjection.cs b/MapProjections/Shared/WorldMercatorProjection.cs index 69d39a12..a979ebb3 100644 --- a/MapProjections/Shared/WorldMercatorProjection.cs +++ b/MapProjections/Shared/WorldMercatorProjection.cs @@ -3,7 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; -#if !WINUI && !UWP +#if WPF using System.Windows; #endif diff --git a/MapProjections/WPF/MapProjections.WPF.csproj b/MapProjections/WPF/MapProjections.WPF.csproj index 8c190a3a..4f905b0e 100644 --- a/MapProjections/WPF/MapProjections.WPF.csproj +++ b/MapProjections/WPF/MapProjections.WPF.csproj @@ -13,7 +13,7 @@ false false XAML.MapControl.MapProjections - + WPF diff --git a/MapUiTools/Shared/MapLayersMenuButton.cs b/MapUiTools/Shared/MapLayersMenuButton.cs index 84eaee07..17cecb56 100644 --- a/MapUiTools/Shared/MapLayersMenuButton.cs +++ b/MapUiTools/Shared/MapLayersMenuButton.cs @@ -6,23 +6,23 @@ using System; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Markup; +#if WPF +using System.Windows; +using System.Windows.Markup; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Markup; -#else -using System.Windows; -using System.Windows.Markup; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Markup; #endif namespace MapControl.UiTools { -#if WINUI || UWP - [ContentProperty(Name = nameof(Layer))] -#else +#if WPF [ContentProperty(nameof(Layer))] +#else + [ContentProperty(Name = nameof(Layer))] #endif public class MapLayerItem { @@ -33,10 +33,10 @@ namespace MapControl.UiTools public UIElement GetLayer() => Layer ?? (Layer = LayerFactory?.Invoke()); } -#if WINUI || UWP - [ContentProperty(Name = nameof(MapLayers))] -#else +#if WPF [ContentProperty(nameof(MapLayers))] +#else + [ContentProperty(Name = nameof(MapLayers))] #endif public class MapLayersMenuButton : MenuButton { diff --git a/MapUiTools/Shared/MapProjectionsMenuButton.cs b/MapUiTools/Shared/MapProjectionsMenuButton.cs index 87c37e10..a6486029 100644 --- a/MapUiTools/Shared/MapProjectionsMenuButton.cs +++ b/MapUiTools/Shared/MapProjectionsMenuButton.cs @@ -5,23 +5,23 @@ using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; -#if WINUI -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Markup; +#if WPF +using System.Windows; +using System.Windows.Markup; #elif UWP using Windows.UI.Xaml; using Windows.UI.Xaml.Markup; -#else -using System.Windows; -using System.Windows.Markup; +#elif WINUI +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Markup; #endif namespace MapControl.UiTools { -#if WINUI || UWP - [ContentProperty(Name = nameof(Projection))] -#else +#if WPF [ContentProperty(nameof(Projection))] +#else + [ContentProperty(Name = nameof(Projection))] #endif public class MapProjectionItem { @@ -29,10 +29,10 @@ namespace MapControl.UiTools public string Projection { get; set; } } -#if WINUI || UWP - [ContentProperty(Name = nameof(MapProjections))] -#else +#if WPF [ContentProperty(nameof(MapProjections))] +#else + [ContentProperty(Name = nameof(MapProjections))] #endif public class MapProjectionsMenuButton : MenuButton { diff --git a/MapUiTools/WPF/MapUiTools.WPF.csproj b/MapUiTools/WPF/MapUiTools.WPF.csproj index 79330fc1..81e328fe 100644 --- a/MapUiTools/WPF/MapUiTools.WPF.csproj +++ b/MapUiTools/WPF/MapUiTools.WPF.csproj @@ -11,7 +11,7 @@ true ..\..\MapControl.snk false - + WPF diff --git a/SampleApps/ProjectionDemo/MainWindow.xaml.cs b/SampleApps/ProjectionDemo/MainWindow.xaml.cs index 4dd00cc3..f70bf8d1 100644 --- a/SampleApps/ProjectionDemo/MainWindow.xaml.cs +++ b/SampleApps/ProjectionDemo/MainWindow.xaml.cs @@ -28,7 +28,7 @@ namespace ProjectionDemo new WmsImageLayer { ServiceUri = new Uri("http://ows.terrestris.de/osm/service"), - Layers = "OSM-WMS" + WmsLayers = "OSM-WMS" }); viewModel.Layers.Add( @@ -36,7 +36,7 @@ namespace ProjectionDemo new WmsImageLayer { ServiceUri = new Uri("https://sgx.geodatenzentrum.de/wms_topplus_open"), - Layers = "web" + WmsLayers = "web" }); viewModel.Layers.Add( @@ -44,7 +44,7 @@ namespace ProjectionDemo new WmsImageLayer { ServiceUri = new Uri("https://geoportal.wiesbaden.de/cgi-bin/mapserv.fcgi?map=d:/openwimap/umn/map/orthophoto/orthophotos.map"), - Layers = "orthophoto2017" + WmsLayers = "orthophoto2017" }); viewModel.CurrentProjection = viewModel.Projections[0];