diff --git a/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs b/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs index c1e4c366..e0da461e 100644 --- a/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache.WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs b/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs index 9768e73e..baea7b3c 100644 --- a/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache.WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs b/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs index a51da95e..b7192d88 100644 --- a/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache.WPF/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs b/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs index e8d60a68..046658e5 100644 --- a/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache.WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/MapPath.Silverlight.WinRT.cs b/MapControl/MapPath.Silverlight.WinRT.cs index aa4607bb..77359bd0 100644 --- a/MapControl/MapPath.Silverlight.WinRT.cs +++ b/MapControl/MapPath.Silverlight.WinRT.cs @@ -3,8 +3,12 @@ // Licensed under the Microsoft Public License (Ms-PL) #if WINDOWS_RUNTIME +using Windows.Foundation; +using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Shapes; #else +using System.Windows; +using System.Windows.Media; using System.Windows.Shapes; #endif @@ -16,5 +20,24 @@ namespace MapControl { MapPanel.AddParentMapHandlers(this); } + + private Geometry data; + + protected override Size MeasureOverride(Size constraint) + { + // Work-around for missing PropertyChangedCallback for the Data property. + if (data != Data) + { + data = Data; + UpdateData(); + } + + // Path.MeasureOverride in Windows Runtime sometimes returns an empty Size, + // whereas in Silverlight it occasionally throws an ArgumentException, + // apparently because it tries to create a Size from negative width or height, + // which result from a transformed Geometry. + // In either case it seems to be sufficient to simply return a non-zero size. + return new Size(1, 1); + } } } diff --git a/MapControl/MapPath.WPF.cs b/MapControl/MapPath.WPF.cs index 4bb4c14a..f59181ae 100644 --- a/MapControl/MapPath.WPF.cs +++ b/MapControl/MapPath.WPF.cs @@ -24,5 +24,11 @@ namespace MapControl { get { return Data; } } + + protected override Size MeasureOverride(Size constraint) + { + // Shape.MeasureOverride sometimes returns an empty Size. + return new Size(1, 1); + } } } diff --git a/MapControl/MapPath.cs b/MapControl/MapPath.cs index 17fa8c80..9c05d7f8 100644 --- a/MapControl/MapPath.cs +++ b/MapControl/MapPath.cs @@ -3,10 +3,8 @@ // Licensed under the Microsoft Public License (Ms-PL) #if WINDOWS_RUNTIME -using Windows.Foundation; using Windows.UI.Xaml.Media; #else -using System.Windows; using System.Windows.Media; #endif @@ -44,15 +42,5 @@ namespace MapControl } } } - - protected override Size MeasureOverride(Size constraint) - { - // base.MeasureOverride in WPF and Windows Runtime sometimes return a Size - // with zero width or height, whereas in Silverlight it occasionally throws - // an ArgumentException, as it tries to create a Size from a negative width - // or height, apparently resulting from a transformed Geometry. - // In either case it seems to be sufficient to simply return a non-zero size. - return new Size(1, 1); - } } } diff --git a/MapControl/Properties/AssemblyInfo.cs b/MapControl/Properties/AssemblyInfo.cs index cc4b7f6a..211cc239 100644 --- a/MapControl/Properties/AssemblyInfo.cs +++ b/MapControl/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/WinRT/Properties/AssemblyInfo.cs b/MapControl/WinRT/Properties/AssemblyInfo.cs index daa70745..3ae655e5 100644 --- a/MapControl/WinRT/Properties/AssemblyInfo.cs +++ b/MapControl/WinRT/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs b/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs index db2a2a97..ee1f8971 100644 --- a/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/PhoneApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs index d0ed6912..eaff58fa 100644 --- a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication/MainPage.xaml b/SampleApps/SilverlightApplication/MainPage.xaml index 23e9f6af..d9ff4cf8 100644 --- a/SampleApps/SilverlightApplication/MainPage.xaml +++ b/SampleApps/SilverlightApplication/MainPage.xaml @@ -163,10 +163,19 @@ - + + + + + + + + + + diff --git a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs index b6a18ace..0f150a42 100644 --- a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/StoreApplication/MainPage.xaml b/SampleApps/StoreApplication/MainPage.xaml index 097d323d..a7e077df 100644 --- a/SampleApps/StoreApplication/MainPage.xaml +++ b/SampleApps/StoreApplication/MainPage.xaml @@ -189,10 +189,19 @@ - + + + + + + + + + + diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs index ce6a319d..b76d3467 100644 --- a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/MainWindow.xaml b/SampleApps/WpfApplication/MainWindow.xaml index 852297f0..27208847 100644 --- a/SampleApps/WpfApplication/MainWindow.xaml +++ b/SampleApps/WpfApplication/MainWindow.xaml @@ -218,6 +218,15 @@ + + + + + + + + + diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index d576773a..fd9b813d 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("© 2015 Clemens Fischer")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("2.4.6")] -[assembly: AssemblyFileVersion("2.4.6")] +[assembly: AssemblyVersion("2.4.7")] +[assembly: AssemblyFileVersion("2.4.7")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)]