2021-06-14 21:41:37 +02:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
2024-02-03 21:01:53 +01:00
|
|
|
|
// Copyright © 2024 Clemens Fischer
|
2021-01-17 23:39:20 +01:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
2024-05-22 11:25:32 +02:00
|
|
|
|
#if WPF
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Data;
|
2021-11-17 23:17:11 +01:00
|
|
|
|
#elif UWP
|
2021-01-17 23:39:20 +01:00
|
|
|
|
using Windows.UI.Xaml;
|
|
|
|
|
|
using Windows.UI.Xaml.Data;
|
2024-05-22 11:25:32 +02:00
|
|
|
|
#elif WINUI
|
|
|
|
|
|
using Microsoft.UI.Xaml;
|
|
|
|
|
|
using Microsoft.UI.Xaml.Data;
|
2021-01-17 23:39:20 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
2021-06-14 21:41:37 +02:00
|
|
|
|
internal static class BindingHelper
|
2021-01-17 23:39:20 +01:00
|
|
|
|
{
|
2024-05-24 18:24:44 +02:00
|
|
|
|
public static Binding CreateBinding(this FrameworkElement source, string property)
|
2021-01-17 23:39:20 +01:00
|
|
|
|
{
|
2024-05-24 18:24:44 +02:00
|
|
|
|
return new Binding
|
2021-01-17 23:39:20 +01:00
|
|
|
|
{
|
2024-05-24 18:24:44 +02:00
|
|
|
|
Source = source,
|
|
|
|
|
|
Path = new PropertyPath(property)
|
|
|
|
|
|
};
|
2021-01-17 23:39:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|