mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-01-23 17:10:25 +01:00
warnings
This commit is contained in:
parent
5bc9c73fad
commit
4113104eff
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace MapControl
|
|||
(map, value) => map.CoerceHeadingProperty(value));
|
||||
|
||||
public static readonly DirectProperty<MapBase, double> ViewScaleProperty =
|
||||
DependencyPropertyHelper.RegisterReadOnly<MapBase, double>(nameof(ViewScale), map => map.ViewScale);
|
||||
AvaloniaProperty.RegisterDirect<MapBase, double>(nameof(ViewScale), map => map.ViewScale);
|
||||
|
||||
private CancellationTokenSource centerCts;
|
||||
private CancellationTokenSource zoomLevelCts;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using Microsoft.UI.Xaml;
|
|||
#else
|
||||
using Windows.UI.Xaml;
|
||||
#endif
|
||||
|
||||
#pragma warning disable IDE0060 // Remove unused parameter
|
||||
|
||||
namespace MapControl
|
||||
|
|
@ -43,5 +44,3 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore IDE0060
|
||||
|
|
|
|||
Loading…
Reference in a new issue