mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 1.1.2: Improved update of child element RenderTransform in MapPanel.SetViewportPosition.
This commit is contained in:
parent
1da0376e05
commit
4867b04fca
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -26,11 +26,13 @@ Global
|
|||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
|
|
@ -40,6 +42,7 @@ Global
|
|||
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -47,6 +50,7 @@ Global
|
|||
{EF44F661-B98A-4676-927F-85D138F82300}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EF44F661-B98A-4676-927F-85D138F82300}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -54,6 +58,7 @@ Global
|
|||
{6285FB9D-B7EA-469A-B464-224077967167}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -61,6 +66,7 @@ Global
|
|||
{6285FB9D-B7EA-469A-B464-224077967167}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{6285FB9D-B7EA-469A-B464-224077967167}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -68,6 +74,7 @@ Global
|
|||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -75,6 +82,7 @@ Global
|
|||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{86470440-FEE2-4120-AF5A-3762FB9C536F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -82,6 +90,7 @@ Global
|
|||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -89,6 +98,7 @@ Global
|
|||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CBA8C535-CCA3-4F60-8D3E-0E25791CBD21}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -96,6 +106,7 @@ Global
|
|||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -103,6 +114,7 @@ Global
|
|||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{177C4EF8-0B0A-426E-BDCC-168DC10AC1C1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -110,6 +122,7 @@ Global
|
|||
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -117,6 +130,7 @@ Global
|
|||
{226F3575-B683-446D-A2F0-181291DC8787}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{226F3575-B683-446D-A2F0-181291DC8787}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -124,6 +138,7 @@ Global
|
|||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -131,6 +146,7 @@ Global
|
|||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EB133B78-DEFF-416A-8F0C-89E54D766576}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -142,6 +158,7 @@ Global
|
|||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|Win32.ActiveCfg = Debug|x86
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x64.Build.0 = Debug|x64
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Debug|x64.Deploy.0 = Debug|x64
|
||||
|
|
@ -157,6 +174,7 @@ Global
|
|||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|Win32.ActiveCfg = Release|x86
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x64.ActiveCfg = Release|x64
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x64.Build.0 = Release|x64
|
||||
{747A3F84-E11F-4EC8-9463-98BBB1E0D0A4}.Release|x64.Deploy.0 = Release|x64
|
||||
|
|
@ -169,6 +187,7 @@ Global
|
|||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|Win32.ActiveCfg = Debug|x86
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x64.Build.0 = Debug|x64
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Debug|x86.ActiveCfg = Debug|x86
|
||||
|
|
@ -179,6 +198,7 @@ Global
|
|||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|ARM.Build.0 = Release|ARM
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|Win32.ActiveCfg = Release|x86
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.ActiveCfg = Release|x64
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x64.Build.0 = Release|x64
|
||||
{63CEFDF7-5170-43B6-86F8-5C4A383A1615}.Release|x86.ActiveCfg = Release|x86
|
||||
|
|
@ -188,6 +208,7 @@ Global
|
|||
{9949326E-9261-4F95-89B1-151F60498951}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -195,6 +216,7 @@ Global
|
|||
{9949326E-9261-4F95-89B1-151F60498951}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{9949326E-9261-4F95-89B1-151F60498951}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
|
|
|
|||
|
|
@ -136,24 +136,17 @@ namespace MapControl
|
|||
|
||||
label.Measure(measureSize);
|
||||
|
||||
var translateTransform = new TranslateTransform
|
||||
{
|
||||
X = StrokeThickness / 2d + 2d,
|
||||
Y = -label.DesiredSize.Height / 2d
|
||||
};
|
||||
var transformGroup = (TransformGroup)label.RenderTransform;
|
||||
|
||||
var transform = (TransformGroup)label.RenderTransform;
|
||||
if (transformGroup.Children.Count == 0)
|
||||
{
|
||||
transformGroup.Children.Add(new TranslateTransform());
|
||||
transformGroup.Children.Add(parentMap.RotateTransform);
|
||||
}
|
||||
|
||||
if (transform.Children.Count == 0)
|
||||
{
|
||||
transform.Children.Add(translateTransform);
|
||||
transform.Children.Add(parentMap.RotateTransform);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.Children[0] = translateTransform;
|
||||
transform.Children[1] = parentMap.RotateTransform;
|
||||
}
|
||||
var translateTransform = (TranslateTransform)transformGroup.Children[0];
|
||||
translateTransform.X = StrokeThickness / 2d + 2d;
|
||||
translateTransform.Y = -label.DesiredSize.Height / 2d;
|
||||
|
||||
MapPanel.SetLocation(label, location);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ namespace MapControl
|
|||
|
||||
private static void SetViewportPosition(UIElement element, MapBase parentMap, Location location)
|
||||
{
|
||||
Point? viewportPosition = null;
|
||||
Point viewportPosition = new Point();
|
||||
|
||||
if (parentMap != null && location != null)
|
||||
{
|
||||
|
|
@ -160,42 +160,38 @@ namespace MapControl
|
|||
element.ClearValue(ViewportPositionProperty);
|
||||
}
|
||||
|
||||
TranslateTransform translateTransform;
|
||||
var transformGroup = element.RenderTransform as TransformGroup;
|
||||
|
||||
if (transformGroup != null)
|
||||
{
|
||||
var transform = new TranslateTransform();
|
||||
var last = transformGroup.Children.Count - 1;
|
||||
|
||||
if (viewportPosition.HasValue)
|
||||
if (last >= 0 && transformGroup.Children[last] is TranslateTransform)
|
||||
{
|
||||
transform.X = viewportPosition.Value.X;
|
||||
transform.Y = viewportPosition.Value.Y;
|
||||
}
|
||||
|
||||
var transformIndex = transformGroup.Children.Count - 1;
|
||||
|
||||
if (transformIndex >= 0 &&
|
||||
transformGroup.Children[transformIndex] is TranslateTransform)
|
||||
{
|
||||
transformGroup.Children[transformIndex] = transform;
|
||||
translateTransform = (TranslateTransform)transformGroup.Children[last];
|
||||
}
|
||||
else
|
||||
{
|
||||
transformGroup.Children.Add(transform);
|
||||
translateTransform = new TranslateTransform();
|
||||
transformGroup.Children.Add(translateTransform);
|
||||
}
|
||||
}
|
||||
else if (viewportPosition.HasValue)
|
||||
{
|
||||
element.RenderTransform = new TranslateTransform
|
||||
{
|
||||
X = viewportPosition.Value.X,
|
||||
Y = viewportPosition.Value.Y
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
element.ClearValue(UIElement.RenderTransformProperty);
|
||||
if (element.RenderTransform is TranslateTransform)
|
||||
{
|
||||
translateTransform = (TranslateTransform)element.RenderTransform;
|
||||
}
|
||||
else
|
||||
{
|
||||
translateTransform = new TranslateTransform();
|
||||
element.RenderTransform = translateTransform;
|
||||
}
|
||||
}
|
||||
|
||||
translateTransform.X = viewportPosition.X;
|
||||
translateTransform.Y = viewportPosition.Y;
|
||||
}
|
||||
|
||||
private static void AlignElementWithLocation(FrameworkElement element, ref Rect arrangeRect)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ using System.Windows;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using System.Windows;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using System.Windows;
|
|||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue