mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
26 lines
669 B
C#
26 lines
669 B
C#
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|
// Copyright © 2024 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
using Avalonia.Data;
|
|
|
|
namespace MapControl
|
|
{
|
|
internal static class BindingHelper
|
|
{
|
|
public static Binding CreateBinding(this object source, string property)
|
|
{
|
|
return new Binding
|
|
{
|
|
Source = source,
|
|
Path = property
|
|
};
|
|
}
|
|
|
|
public static void SetBinding(this AvaloniaObject target, AvaloniaProperty property, Binding binding)
|
|
{
|
|
target.Bind(property, binding);
|
|
}
|
|
}
|
|
}
|