mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 15:05:50 +00:00
Use Async method name suffix consistently
This commit is contained in:
parent
f3aad38814
commit
adc34b6591
9 changed files with 29 additions and 28 deletions
|
|
@ -56,8 +56,7 @@ namespace MapControl
|
|||
}
|
||||
|
||||
public static readonly DependencyProperty SourcePathProperty = DependencyProperty.Register(
|
||||
nameof(SourcePath), typeof(string), typeof(GroundOverlay),
|
||||
new PropertyMetadata(null, async (o, e) => await ((GroundOverlay)o).SourcePathPropertyChanged((string)e.NewValue)));
|
||||
nameof(SourcePath), typeof(string), typeof(GroundOverlay), new PropertyMetadata(null, SourcePathPropertyChanged));
|
||||
|
||||
public string SourcePath
|
||||
{
|
||||
|
|
@ -65,8 +64,10 @@ namespace MapControl
|
|||
set => SetValue(SourcePathProperty, value);
|
||||
}
|
||||
|
||||
private async Task SourcePathPropertyChanged(string sourcePath)
|
||||
private static async void SourcePathPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var groundOverlay = (GroundOverlay)obj;
|
||||
var sourcePath = (string)e.NewValue;
|
||||
IEnumerable<ImageOverlay> imageOverlays = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(sourcePath))
|
||||
|
|
@ -90,11 +91,11 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
Children.Clear();
|
||||
groundOverlay.Children.Clear();
|
||||
|
||||
if (imageOverlays != null)
|
||||
{
|
||||
AddImageOverlays(imageOverlays);
|
||||
groundOverlay.AddImageOverlays(imageOverlays);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue