mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 2.5.0:
- moved tile rect calculation from MapBase to TileLayer - added TileLayer.ZoomLevelOffset property - Windows Universal sample application in solution MapControl VS2015
This commit is contained in:
parent
36a8600faf
commit
98cdc95c5d
80 changed files with 16033 additions and 456 deletions
36
SampleApps/UniversalApp/BindingHelper.cs
Normal file
36
SampleApps/UniversalApp/BindingHelper.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using MapControl;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Data;
|
||||
|
||||
namespace UniversalApp
|
||||
{
|
||||
public class BindingHelper
|
||||
{
|
||||
public static readonly DependencyProperty LocationPathProperty = DependencyProperty.RegisterAttached(
|
||||
"LocationPath", typeof(string), typeof(BindingHelper),
|
||||
new PropertyMetadata(null, LocationPathPropertyChanged));
|
||||
|
||||
public static string GetLocationPath(DependencyObject obj)
|
||||
{
|
||||
return (string)obj.GetValue(LocationPathProperty);
|
||||
}
|
||||
|
||||
public static void SetLocationPath(DependencyObject obj, string value)
|
||||
{
|
||||
obj.SetValue(LocationPathProperty, value);
|
||||
}
|
||||
|
||||
private static void LocationPathPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var propertyPath = e.NewValue as string;
|
||||
|
||||
if (propertyPath != null)
|
||||
{
|
||||
BindingOperations.SetBinding(
|
||||
obj,
|
||||
MapPanel.LocationProperty,
|
||||
new Binding { Path = new PropertyPath(propertyPath) });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue