diff --git a/FileDbCache/UWP/FileDbCache.UWP.csproj b/FileDbCache/UWP/FileDbCache.UWP.csproj index 8a9d9210..d0e914c5 100644 --- a/FileDbCache/UWP/FileDbCache.UWP.csproj +++ b/FileDbCache/UWP/FileDbCache.UWP.csproj @@ -49,10 +49,10 @@ - 7.4.3 + 7.4.4 - 6.2.8 + 6.2.9 diff --git a/FileDbCache/UWP/Properties/AssemblyInfo.cs b/FileDbCache/UWP/Properties/AssemblyInfo.cs index 22cf3d1d..bf1edd2b 100644 --- a/FileDbCache/UWP/Properties/AssemblyInfo.cs +++ b/FileDbCache/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/FileDbCache/WPF/Properties/AssemblyInfo.cs b/FileDbCache/WPF/Properties/AssemblyInfo.cs index 8dec1881..15c49371 100644 --- a/FileDbCache/WPF/Properties/AssemblyInfo.cs +++ b/FileDbCache/WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MBTiles/UWP/MBTiles.UWP.csproj b/MBTiles/UWP/MBTiles.UWP.csproj index d50ebfeb..da59dce9 100644 --- a/MBTiles/UWP/MBTiles.UWP.csproj +++ b/MBTiles/UWP/MBTiles.UWP.csproj @@ -54,7 +54,7 @@ - 6.2.8 + 6.2.9 1.0.111 diff --git a/MBTiles/UWP/Properties/AssemblyInfo.cs b/MBTiles/UWP/Properties/AssemblyInfo.cs index dbd9d616..a34ad764 100644 --- a/MBTiles/UWP/Properties/AssemblyInfo.cs +++ b/MBTiles/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MBTiles/WPF/Properties/AssemblyInfo.cs b/MBTiles/WPF/Properties/AssemblyInfo.cs index 61dd2889..73f09f65 100644 --- a/MBTiles/WPF/Properties/AssemblyInfo.cs +++ b/MBTiles/WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl.sln b/MapControl.sln index f0d5c615..d84e9874 100644 --- a/MapControl.sln +++ b/MapControl.sln @@ -15,6 +15,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalApp", "SampleApps\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapControl.UWP", "MapControl\UWP\MapControl.UWP.csproj", "{9545F73C-9C35-4CF6-BAAE-19A0BAEBD344}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MapControl.WPF.Core", "MapControl\WPF.Core\MapControl.WPF.Core.csproj", "{257D91EB-4DD1-4179-B9F3-7584BF5435D3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfCoreApp", "SampleApps\WpfCoreApp\WpfCoreApp.csproj", "{E9D15B9A-75F5-40A9-A582-9BFBB074C127}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -99,6 +103,38 @@ Global {9545F73C-9C35-4CF6-BAAE-19A0BAEBD344}.Release|x64.Build.0 = Release|Any CPU {9545F73C-9C35-4CF6-BAAE-19A0BAEBD344}.Release|x86.ActiveCfg = Release|Any CPU {9545F73C-9C35-4CF6-BAAE-19A0BAEBD344}.Release|x86.Build.0 = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|ARM.Build.0 = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|x64.ActiveCfg = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|x64.Build.0 = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|x86.ActiveCfg = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Debug|x86.Build.0 = Debug|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|Any CPU.Build.0 = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|ARM.ActiveCfg = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|ARM.Build.0 = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|x64.ActiveCfg = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|x64.Build.0 = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|x86.ActiveCfg = Release|Any CPU + {257D91EB-4DD1-4179-B9F3-7584BF5435D3}.Release|x86.Build.0 = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|ARM.ActiveCfg = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|ARM.Build.0 = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|x64.ActiveCfg = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|x64.Build.0 = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|x86.ActiveCfg = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Debug|x86.Build.0 = Debug|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|Any CPU.Build.0 = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|ARM.ActiveCfg = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|ARM.Build.0 = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|x64.ActiveCfg = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|x64.Build.0 = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|x86.ActiveCfg = Release|Any CPU + {E9D15B9A-75F5-40A9-A582-9BFBB074C127}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -108,6 +144,8 @@ Global {F92DA93D-75DB-4308-A5F9-6B4C3908A675} = {8F2103C2-78AF-4810-8FB9-67572F50C8FC} {AA62B4AA-1CA3-4C20-BEB7-B824D0FC4BD1} = {8F2103C2-78AF-4810-8FB9-67572F50C8FC} {9545F73C-9C35-4CF6-BAAE-19A0BAEBD344} = {52AECE49-F314-4F76-98F2-FA800F07824B} + {257D91EB-4DD1-4179-B9F3-7584BF5435D3} = {52AECE49-F314-4F76-98F2-FA800F07824B} + {E9D15B9A-75F5-40A9-A582-9BFBB074C127} = {8F2103C2-78AF-4810-8FB9-67572F50C8FC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {458346DD-B23F-4FDC-8F9D-A10F1882A4DB} diff --git a/MapControl/UWP/MapControl.UWP.csproj b/MapControl/UWP/MapControl.UWP.csproj index 1b3e55a2..13198ba9 100644 --- a/MapControl/UWP/MapControl.UWP.csproj +++ b/MapControl/UWP/MapControl.UWP.csproj @@ -175,7 +175,7 @@ - 6.2.8 + 6.2.9 diff --git a/MapControl/UWP/Properties/AssemblyInfo.cs b/MapControl/UWP/Properties/AssemblyInfo.cs index 53df0406..8517f0e6 100644 --- a/MapControl/UWP/Properties/AssemblyInfo.cs +++ b/MapControl/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/WPF.Core/AssemblyInfo.cs b/MapControl/WPF.Core/AssemblyInfo.cs new file mode 100644 index 00000000..76af59d2 --- /dev/null +++ b/MapControl/WPF.Core/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Windows; + +[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] diff --git a/MapControl/WPF.Core/MapControl.WPF.Core.csproj b/MapControl/WPF.Core/MapControl.WPF.Core.csproj new file mode 100644 index 00000000..400ae4a2 --- /dev/null +++ b/MapControl/WPF.Core/MapControl.WPF.Core.csproj @@ -0,0 +1,91 @@ + + + + netcoreapp3.0 + true + MapControl + true + ..\..\MapControl.snk + false + XAML Map Control + Clemens Fischer + 4.14.0 + XAML Map Control Library + Copyright © 2019 Clemens Fischer + false + XAML.MapControl.Core + + + + TRACE;NET_CORE + + + + TRACE;NET_CORE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MapControl/WPF.Core/MapControl.WPF.Core.csproj.user b/MapControl/WPF.Core/MapControl.WPF.Core.csproj.user new file mode 100644 index 00000000..3c8701a4 --- /dev/null +++ b/MapControl/WPF.Core/MapControl.WPF.Core.csproj.user @@ -0,0 +1,9 @@ + + + + + + Designer + + + \ No newline at end of file diff --git a/MapControl/WPF.Core/Themes/Generic.xaml b/MapControl/WPF.Core/Themes/Generic.xaml new file mode 100644 index 00000000..5fb6de02 --- /dev/null +++ b/MapControl/WPF.Core/Themes/Generic.xaml @@ -0,0 +1,67 @@ + + + + + diff --git a/MapControl/WPF/ImageFileCache.WPF.cs b/MapControl/WPF/ImageFileCache.WPF.cs index 709f9619..4a80618f 100644 --- a/MapControl/WPF/ImageFileCache.WPF.cs +++ b/MapControl/WPF/ImageFileCache.WPF.cs @@ -186,9 +186,11 @@ namespace MapControl.Caching stream.Write(BitConverter.GetBytes(imageCacheItem.Expiration.Ticks), 0, 8); } +#if !NET_CORE var fileSecurity = File.GetAccessControl(path); fileSecurity.AddAccessRule(fullControlRule); File.SetAccessControl(path, fileSecurity); +#endif } catch (Exception ex) { diff --git a/MapControl/WPF/Properties/AssemblyInfo.cs b/MapControl/WPF/Properties/AssemblyInfo.cs index 9fdaf6a1..04ed5b4c 100644 --- a/MapControl/WPF/Properties/AssemblyInfo.cs +++ b/MapControl/WPF/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapImages/UWP/MapImages.UWP.csproj b/MapImages/UWP/MapImages.UWP.csproj index d3764447..50c6caeb 100644 --- a/MapImages/UWP/MapImages.UWP.csproj +++ b/MapImages/UWP/MapImages.UWP.csproj @@ -51,7 +51,7 @@ - 6.2.8 + 6.2.9 diff --git a/MapImages/UWP/Properties/AssemblyInfo.cs b/MapImages/UWP/Properties/AssemblyInfo.cs index fefde313..1d7df653 100644 --- a/MapImages/UWP/Properties/AssemblyInfo.cs +++ b/MapImages/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapImages/WPF/Properties/AssemblyInfo.cs b/MapImages/WPF/Properties/AssemblyInfo.cs index c296f1ec..2da83f0f 100644 --- a/MapImages/WPF/Properties/AssemblyInfo.cs +++ b/MapImages/WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapProjections/UWP/MapProjections.UWP.csproj b/MapProjections/UWP/MapProjections.UWP.csproj index 2da9557b..3cab3093 100644 --- a/MapProjections/UWP/MapProjections.UWP.csproj +++ b/MapProjections/UWP/MapProjections.UWP.csproj @@ -57,7 +57,7 @@ - 6.2.8 + 6.2.9 1.4.1 diff --git a/MapProjections/UWP/Properties/AssemblyInfo.cs b/MapProjections/UWP/Properties/AssemblyInfo.cs index a5cf22a2..2cb57eb0 100644 --- a/MapProjections/UWP/Properties/AssemblyInfo.cs +++ b/MapProjections/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapProjections/WPF/Properties/AssemblyInfo.cs b/MapProjections/WPF/Properties/AssemblyInfo.cs index e0efdc4a..72c53e6f 100644 --- a/MapProjections/WPF/Properties/AssemblyInfo.cs +++ b/MapProjections/WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SQLiteCache/UWP/Properties/AssemblyInfo.cs b/SQLiteCache/UWP/Properties/AssemblyInfo.cs index 0042342f..5fbbbdea 100644 --- a/SQLiteCache/UWP/Properties/AssemblyInfo.cs +++ b/SQLiteCache/UWP/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SQLiteCache/UWP/SQLiteCache.UWP.csproj b/SQLiteCache/UWP/SQLiteCache.UWP.csproj index c2208d8d..6de35386 100644 --- a/SQLiteCache/UWP/SQLiteCache.UWP.csproj +++ b/SQLiteCache/UWP/SQLiteCache.UWP.csproj @@ -49,7 +49,7 @@ - 6.2.8 + 6.2.9 1.0.111 diff --git a/SQLiteCache/WPF/Properties/AssemblyInfo.cs b/SQLiteCache/WPF/Properties/AssemblyInfo.cs index a8478042..9b888f2a 100644 --- a/SQLiteCache/WPF/Properties/AssemblyInfo.cs +++ b/SQLiteCache/WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/UniversalApp/Properties/AssemblyInfo.cs b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs index 37bb602f..be46d9d8 100644 --- a/SampleApps/UniversalApp/Properties/AssemblyInfo.cs +++ b/SampleApps/UniversalApp/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: ComVisible(false)] diff --git a/SampleApps/UniversalApp/UniversalApp.csproj b/SampleApps/UniversalApp/UniversalApp.csproj index e1d13961..383b9853 100644 --- a/SampleApps/UniversalApp/UniversalApp.csproj +++ b/SampleApps/UniversalApp/UniversalApp.csproj @@ -152,7 +152,7 @@ - 6.2.8 + 6.2.9 diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index 71376ff5..7f2a1c46 100644 --- a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © 2019 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("4.13.1")] -[assembly: AssemblyFileVersion("4.13.1")] +[assembly: AssemblyVersion("4.14.0")] +[assembly: AssemblyFileVersion("4.14.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfCoreApp/App.xaml b/SampleApps/WpfCoreApp/App.xaml new file mode 100644 index 00000000..dcc41a2c --- /dev/null +++ b/SampleApps/WpfCoreApp/App.xaml @@ -0,0 +1,7 @@ + + + + diff --git a/SampleApps/WpfCoreApp/App.xaml.cs b/SampleApps/WpfCoreApp/App.xaml.cs new file mode 100644 index 00000000..6105bf88 --- /dev/null +++ b/SampleApps/WpfCoreApp/App.xaml.cs @@ -0,0 +1,8 @@ +using System.Windows; + +namespace WpfApplication +{ + public partial class App : Application + { + } +} diff --git a/SampleApps/WpfCoreApp/LocationToVisibilityConverter.cs b/SampleApps/WpfCoreApp/LocationToVisibilityConverter.cs new file mode 100644 index 00000000..0ba383c8 --- /dev/null +++ b/SampleApps/WpfCoreApp/LocationToVisibilityConverter.cs @@ -0,0 +1,36 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using MapControl; + +namespace WpfCoreApp +{ + public class LocationToVisibilityConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + var visibility = Visibility.Hidden; + + if (values.Length == 2 && values[0] is MapBase && values[1] is Point?) + { + var parentMap = (MapBase)values[0]; + var position = (Point?)values[1]; + + if (position.HasValue && + position.Value.X >= 0d && position.Value.X <= parentMap.ActualWidth && + position.Value.Y >= 0d && position.Value.Y <= parentMap.ActualHeight) + { + visibility = Visibility.Visible; + } + } + + return visibility; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } + } +} diff --git a/SampleApps/WpfCoreApp/MainWindow.xaml b/SampleApps/WpfCoreApp/MainWindow.xaml new file mode 100644 index 00000000..b7dddacd --- /dev/null +++ b/SampleApps/WpfCoreApp/MainWindow.xaml @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SampleApps/WpfCoreApp/MainWindow.xaml.cs b/SampleApps/WpfCoreApp/MainWindow.xaml.cs new file mode 100644 index 00000000..05ec8412 --- /dev/null +++ b/SampleApps/WpfCoreApp/MainWindow.xaml.cs @@ -0,0 +1,91 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Input; +using MapControl; +using ViewModel; + +namespace WpfCoreApp +{ + public partial class MainWindow : Window + { + public MainWindow() + { + ImageLoader.HttpClient.DefaultRequestHeaders.Add("User-Agent", "XAML Map Control Test Application"); + TileImageLoader.Cache = new MapControl.Caching.ImageFileCache(TileImageLoader.DefaultCacheFolder); + + InitializeComponent(); + } + + private void MapMouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + if (e.ClickCount == 2) + { + //map.ZoomMap(e.GetPosition(map), Math.Floor(map.ZoomLevel + 1.5)); + //map.ZoomToBounds(new BoundingBox(53, 7, 54, 9)); + map.TargetCenter = map.ViewportPointToLocation(e.GetPosition(map)); + } + } + + private void MapMouseRightButtonDown(object sender, MouseButtonEventArgs e) + { + if (e.ClickCount == 2) + { + //map.ZoomMap(e.GetPosition(map), Math.Ceiling(map.ZoomLevel - 1.5)); + } + } + + private void MapMouseMove(object sender, MouseEventArgs e) + { + var location = map.ViewportPointToLocation(e.GetPosition(map)); + var latitude = (int)Math.Round(location.Latitude * 60000d); + var longitude = (int)Math.Round(Location.NormalizeLongitude(location.Longitude) * 60000d); + var latHemisphere = 'N'; + var lonHemisphere = 'E'; + + if (latitude < 0) + { + latitude = -latitude; + latHemisphere = 'S'; + } + + if (longitude < 0) + { + longitude = -longitude; + lonHemisphere = 'W'; + } + + mouseLocation.Text = string.Format(CultureInfo.InvariantCulture, + "{0} {1:00} {2:00.000}\n{3} {4:000} {5:00.000}", + latHemisphere, latitude / 60000, (latitude % 60000) / 1000d, + lonHemisphere, longitude / 60000, (longitude % 60000) / 1000d); + } + + private void MapMouseLeave(object sender, MouseEventArgs e) + { + mouseLocation.Text = string.Empty; + } + + private void MapManipulationInertiaStarting(object sender, ManipulationInertiaStartingEventArgs e) + { + e.TranslationBehavior.DesiredDeceleration = 0.001; + } + + private void MapItemTouchDown(object sender, TouchEventArgs e) + { + var mapItem = (MapItem)sender; + mapItem.IsSelected = !mapItem.IsSelected; + e.Handled = true; + } + + private void SeamarksChecked(object sender, RoutedEventArgs e) + { + map.Children.Insert(map.Children.IndexOf(mapGraticule), ((MapViewModel)DataContext).MapLayers.SeamarksLayer); + } + + private void SeamarksUnchecked(object sender, RoutedEventArgs e) + { + map.Children.Remove(((MapViewModel)DataContext).MapLayers.SeamarksLayer); + } + } +} diff --git a/SampleApps/WpfCoreApp/OutlinedText.cs b/SampleApps/WpfCoreApp/OutlinedText.cs new file mode 100644 index 00000000..f36477c3 --- /dev/null +++ b/SampleApps/WpfCoreApp/OutlinedText.cs @@ -0,0 +1,145 @@ +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace WpfCoreApp +{ + public class OutlinedText : FrameworkElement + { + private GlyphRun glyphRun; + private Geometry outline; + + public static readonly DependencyProperty TextProperty = TextBlock.TextProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty FontSizeProperty = TextBlock.FontSizeProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty FontFamilyProperty = TextBlock.FontFamilyProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty FontStyleProperty = TextBlock.FontStyleProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty FontWeightProperty = TextBlock.FontWeightProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty FontStretchProperty = TextBlock.FontStretchProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty ForegroundProperty = TextBlock.ForegroundProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata((o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty BackgroundProperty = TextBlock.BackgroundProperty.AddOwner( + typeof(OutlinedText), new FrameworkPropertyMetadata(Brushes.White, (o, e) => ((OutlinedText)o).glyphRun = null) { AffectsMeasure = true }); + + public static readonly DependencyProperty OutlineThicknessProperty = DependencyProperty.Register( + "OutlineThickness", typeof(double), typeof(OutlinedText), + new FrameworkPropertyMetadata(1d, FrameworkPropertyMetadataOptions.AffectsMeasure, (o, e) => ((OutlinedText)o).glyphRun = null)); + + public string Text + { + get { return (string)GetValue(TextProperty); } + set { SetValue(TextProperty, value); } + } + + public double FontSize + { + get { return (double)GetValue(FontSizeProperty); } + set { SetValue(FontSizeProperty, value); } + } + + public FontFamily FontFamily + { + get { return (FontFamily)GetValue(FontFamilyProperty); } + set { SetValue(FontFamilyProperty, value); } + } + + public FontStyle FontStyle + { + get { return (FontStyle)GetValue(FontStyleProperty); } + set { SetValue(FontStyleProperty, value); } + } + + public FontWeight FontWeight + { + get { return (FontWeight)GetValue(FontWeightProperty); } + set { SetValue(FontWeightProperty, value); } + } + + public FontStretch FontStretch + { + get { return (FontStretch)GetValue(FontStretchProperty); } + set { SetValue(FontStretchProperty, value); } + } + + public Brush Foreground + { + get { return (Brush)GetValue(ForegroundProperty); } + set { SetValue(ForegroundProperty, value); } + } + + public Brush Background + { + get { return (Brush)GetValue(BackgroundProperty); } + set { SetValue(BackgroundProperty, value); } + } + + public double OutlineThickness + { + get { return (double)GetValue(OutlineThicknessProperty); } + set { SetValue(OutlineThicknessProperty, value); } + } + + protected override Size MeasureOverride(Size availableSize) + { + return CheckGlyphRun() ? outline.Bounds.Size : new Size(); + } + + protected override void OnRender(DrawingContext drawingContext) + { + if (CheckGlyphRun()) + { + var location = outline.Bounds.Location; + drawingContext.PushTransform(new TranslateTransform(-location.X, -location.Y)); + drawingContext.DrawGeometry(Background, null, outline); + drawingContext.DrawGlyphRun(Foreground, glyphRun); + } + } + + private bool CheckGlyphRun() + { + if (glyphRun == null) + { + if (string.IsNullOrEmpty(Text)) + { + return false; + } + + var typeface = new Typeface(FontFamily, FontStyle, FontWeight, FontStretch); + GlyphTypeface glyphTypeface; + + if (!typeface.TryGetGlyphTypeface(out glyphTypeface)) + { + return false; + } + + var glyphIndices = new ushort[Text.Length]; + var advanceWidths = new double[Text.Length]; + + for (int i = 0; i < Text.Length; i++) + { + var glyphIndex = glyphTypeface.CharacterToGlyphMap[Text[i]]; + glyphIndices[i] = glyphIndex; + advanceWidths[i] = glyphTypeface.AdvanceWidths[glyphIndex] * FontSize; + } + + glyphRun = new GlyphRun(glyphTypeface, 0, false, FontSize, 1f, glyphIndices, new Point(), advanceWidths, null, null, null, null, null, null); + + outline = glyphRun.BuildGeometry().GetWidenedPathGeometry(new Pen(null, OutlineThickness * 2d)); + } + + return true; + } + } +} diff --git a/SampleApps/WpfCoreApp/WpfCoreApp.csproj b/SampleApps/WpfCoreApp/WpfCoreApp.csproj new file mode 100644 index 00000000..ce9b250a --- /dev/null +++ b/SampleApps/WpfCoreApp/WpfCoreApp.csproj @@ -0,0 +1,26 @@ + + + + WinExe + netcoreapp3.0 + true + WpfCoreApp + 4.14.0 + Clemens Fischer + XAML Map Control + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleApps/WpfCoreApp/WpfCoreApp.csproj.user b/SampleApps/WpfCoreApp/WpfCoreApp.csproj.user new file mode 100644 index 00000000..644b0a6f --- /dev/null +++ b/SampleApps/WpfCoreApp/WpfCoreApp.csproj.user @@ -0,0 +1,14 @@ + + + + + + Designer + + + + + Designer + + + \ No newline at end of file