DependencyPropertyHelper

This commit is contained in:
ClemensFischer 2024-05-23 18:08:14 +02:00
parent c74c2b1fed
commit 8e82e0bcbd
25 changed files with 224 additions and 176 deletions

View file

@ -18,9 +18,9 @@ namespace MapControl.MBTiles
/// </summary>
public class MBTileLayer : MapTileLayer
{
public static readonly DependencyProperty FileProperty = DependencyProperty.Register(
nameof(File), typeof(string), typeof(MBTileLayer),
new PropertyMetadata(null, async (o, e) => await ((MBTileLayer)o).FilePropertyChanged((string)e.NewValue)));
public static readonly DependencyProperty FileProperty =
DependencyPropertyHelper.Register<MBTileLayer, string>(nameof(File), null, false,
async (layer, oldValue, newValue) => await layer.FilePropertyChanged(newValue));
public string File
{