This commit is contained in:
ClemensFischer 2024-05-21 14:39:53 +02:00
parent 5bc9c73fad
commit 4113104eff
3 changed files with 4 additions and 12 deletions

View file

@ -2,9 +2,10 @@
using Avalonia.Controls;
using System;
#pragma warning disable AVP1001 // The same AvaloniaProperty should not be registered twice
namespace MapControl
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1001")]
public static class DependencyPropertyHelper
{
public static StyledProperty<TValue> Register<TOwner, TValue>(
@ -43,13 +44,5 @@ namespace MapControl
return property;
}
public static DirectProperty<TOwner, TValue> RegisterReadOnly<TOwner, TValue>(
string name,
Func<TOwner, TValue> getter)
where TOwner : AvaloniaObject
{
return AvaloniaProperty.RegisterDirect(name, getter);
}
}
}