From 1b8a89a504def9667d02dff81d4f7e4ed9ff55fb Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Tue, 23 Apr 2024 18:32:07 +0200 Subject: [PATCH] Removed MapLayers Resources --- SampleApps/WpfApplication/MainWindow.xaml | 58 +++++++++++++---- SampleApps/WpfApplication/MainWindow.xaml.cs | 26 +++++++- SampleApps/WpfApplication/MapLayers.xaml | 65 -------------------- 3 files changed, 69 insertions(+), 80 deletions(-) delete mode 100644 SampleApps/WpfApplication/MapLayers.xaml diff --git a/SampleApps/WpfApplication/MainWindow.xaml b/SampleApps/WpfApplication/MainWindow.xaml index 9cd5d673..a0301aa6 100644 --- a/SampleApps/WpfApplication/MainWindow.xaml +++ b/SampleApps/WpfApplication/MainWindow.xaml @@ -9,10 +9,6 @@ - - - - @@ -189,13 +185,46 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -203,7 +232,12 @@ - + + + diff --git a/SampleApps/WpfApplication/MainWindow.xaml.cs b/SampleApps/WpfApplication/MainWindow.xaml.cs index 5eb4d733..c3cf98cb 100644 --- a/SampleApps/WpfApplication/MainWindow.xaml.cs +++ b/SampleApps/WpfApplication/MainWindow.xaml.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Windows; using System.Windows.Input; +using System.Windows.Media; namespace SampleApplication { @@ -41,19 +42,38 @@ namespace SampleApplication mapLayersMenuButton.MapLayers.Add(new MapLayerItem { Text = "Bing Maps Road", - Layer = (UIElement)Resources["BingMapsRoad"] + Layer = new BingMapsTileLayer + { + Mode = BingMapsTileLayer.MapMode.Road, + SourceName = "Bing Maps Road", + Description = "© [Microsoft](http://www.bing.com/maps/)" + } }); mapLayersMenuButton.MapLayers.Add(new MapLayerItem { Text = "Bing Maps Aerial", - Layer = (UIElement)Resources["BingMapsAerial"] + Layer = new BingMapsTileLayer + { + Mode = BingMapsTileLayer.MapMode.Aerial, + SourceName = "Bing Maps Aerial", + Description = "© [Microsoft](http://www.bing.com/maps/)", + MapForeground = Brushes.White, + MapBackground = Brushes.Black + } }); mapLayersMenuButton.MapLayers.Add(new MapLayerItem { Text = "Bing Maps Aerial with Labels", - Layer = (UIElement)Resources["BingMapsHybrid"] + Layer = new BingMapsTileLayer + { + Mode = BingMapsTileLayer.MapMode.AerialWithLabels, + SourceName = "Bing Maps Hybrid", + Description = "© [Microsoft](http://www.bing.com/maps/)", + MapForeground = Brushes.White, + MapBackground = Brushes.Black + } }); } diff --git a/SampleApps/WpfApplication/MapLayers.xaml b/SampleApps/WpfApplication/MapLayers.xaml deleted file mode 100644 index 9fa0650a..00000000 --- a/SampleApps/WpfApplication/MapLayers.xaml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - -