diff --git a/MapControl/Shared/MapImageLayer.cs b/MapControl/Shared/MapImageLayer.cs index 2705930a..ecb395b1 100644 --- a/MapControl/Shared/MapImageLayer.cs +++ b/MapControl/Shared/MapImageLayer.cs @@ -63,7 +63,7 @@ namespace MapControl loadingProgress = new Progress(p => SetValue(LoadingProgressProperty, p)); updateTimer = new UpdateTimer { Interval = UpdateInterval }; - updateTimer.Tick += async (s, e) => await UpdateImageAsync(); + updateTimer.Tick += async (_, _) => await UpdateImageAsync(); } /// diff --git a/MapControl/Shared/TilePyramidLayer.cs b/MapControl/Shared/TilePyramidLayer.cs index 1475c019..a1b2393d 100644 --- a/MapControl/Shared/TilePyramidLayer.cs +++ b/MapControl/Shared/TilePyramidLayer.cs @@ -62,7 +62,7 @@ namespace MapControl loadingProgress = new Progress(p => SetValue(LoadingProgressProperty, p)); updateTimer = new UpdateTimer { Interval = UpdateInterval }; - updateTimer.Tick += (s, e) => UpdateTiles(); + updateTimer.Tick += (_, _) => UpdateTiles(); #if WPF RenderOptions.SetEdgeMode(this, EdgeMode.Aliased); #elif UWP || WINUI diff --git a/MapControl/WinUI/MapPanel.WinUI.cs b/MapControl/WinUI/MapPanel.WinUI.cs index 7a85a8e5..0f78bb05 100644 --- a/MapControl/WinUI/MapPanel.WinUI.cs +++ b/MapControl/WinUI/MapPanel.WinUI.cs @@ -26,8 +26,8 @@ namespace MapControl // Workaround for missing property value inheritance. // Loaded and Unloaded handlers set and clear the ParentMap property value. // - element.Loaded += (s, e) => GetParentMap((FrameworkElement)s); - element.Unloaded += (s, e) => ((FrameworkElement)s).ClearValue(ParentMapProperty); + element.Loaded += (_, _) => GetParentMap(element); + element.Unloaded += (_, _) => element.ClearValue(ParentMapProperty); } public static MapBase GetParentMap(FrameworkElement element) diff --git a/MapControl/WinUI/PushpinBorder.WinUI.cs b/MapControl/WinUI/PushpinBorder.WinUI.cs index 0ea7956c..1557a682 100644 --- a/MapControl/WinUI/PushpinBorder.WinUI.cs +++ b/MapControl/WinUI/PushpinBorder.WinUI.cs @@ -59,7 +59,7 @@ namespace MapControl Content = grid; - SizeChanged += (s, e) => path.Data = BuildGeometry(); + SizeChanged += (_, _) => path.Data = BuildGeometry(); } public UIElement Child diff --git a/MapUiTools/Avalonia/MapMenuItem.Avalonia.cs b/MapUiTools/Avalonia/MapMenuItem.Avalonia.cs index 89492bae..2c87b646 100644 --- a/MapUiTools/Avalonia/MapMenuItem.Avalonia.cs +++ b/MapUiTools/Avalonia/MapMenuItem.Avalonia.cs @@ -18,8 +18,8 @@ namespace MapControl.UiTools VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center, }; - Loaded += (s, e) => Initialize(); - Click += (s, e) => Execute(); + Loaded += (_, _) => Initialize(); + Click += (_, _) => Execute(); } public string Text diff --git a/MapUiTools/Avalonia/MenuButton.Avalonia.cs b/MapUiTools/Avalonia/MenuButton.Avalonia.cs index 1b50cc19..1db37895 100644 --- a/MapUiTools/Avalonia/MenuButton.Avalonia.cs +++ b/MapUiTools/Avalonia/MenuButton.Avalonia.cs @@ -18,7 +18,7 @@ namespace MapControl.UiTools Styles.Add(style); Flyout = new MenuFlyout(); - Loaded += async (s, e) => await Initialize(); + Loaded += async (_, _) => await Initialize(); } public string Icon diff --git a/MapUiTools/Shared/HyperlinkText.cs b/MapUiTools/Shared/HyperlinkText.cs index b9763f2d..b4141780 100644 --- a/MapUiTools/Shared/HyperlinkText.cs +++ b/MapUiTools/Shared/HyperlinkText.cs @@ -46,7 +46,7 @@ namespace MapControl.UiTools #if WPF link.ToolTip = uri.ToString(); - link.RequestNavigate += (s, e) => + link.RequestNavigate += (_, e) => { try { diff --git a/MapUiTools/WPF/MapMenuItem.WPF.cs b/MapUiTools/WPF/MapMenuItem.WPF.cs index 55a9d8bd..7af3d921 100644 --- a/MapUiTools/WPF/MapMenuItem.WPF.cs +++ b/MapUiTools/WPF/MapMenuItem.WPF.cs @@ -8,8 +8,8 @@ namespace MapControl.UiTools { protected MapMenuItem() { - Loaded += (s, e) => Initialize(); - Click += (s, e) => Execute(); + Loaded += (_, _) => Initialize(); + Click += (_, _) => Execute(); } public string Text diff --git a/MapUiTools/WPF/MenuButton.WPF.cs b/MapUiTools/WPF/MenuButton.WPF.cs index dede25f2..efed2f6b 100644 --- a/MapUiTools/WPF/MenuButton.WPF.cs +++ b/MapUiTools/WPF/MenuButton.WPF.cs @@ -15,9 +15,9 @@ namespace MapControl.UiTools public MenuButton() { ContextMenu = new ContextMenu(); - DataContextChanged += (s, e) => ContextMenu.DataContext = e.NewValue; - Loaded += async (s, e) => await Initialize(); - Click += (s, e) => ContextMenu.IsOpen = true; + DataContextChanged += (_, e) => ContextMenu.DataContext = e.NewValue; + Loaded += async (_, _) => await Initialize(); + Click += (_, _) => ContextMenu.IsOpen = true; } public string Icon diff --git a/MapUiTools/WinUI/MapMenuItem.WinUI.cs b/MapUiTools/WinUI/MapMenuItem.WinUI.cs index 8395dd1e..9f4da178 100644 --- a/MapUiTools/WinUI/MapMenuItem.WinUI.cs +++ b/MapUiTools/WinUI/MapMenuItem.WinUI.cs @@ -14,13 +14,13 @@ namespace MapControl.UiTools { protected MapMenuItem() { - Loaded += (s, e) => + Loaded += (_, _) => { ParentMenuItems = ((Panel)VisualTreeHelper.GetParent(this)).Children.OfType().ToList(); Initialize(); }; - Click += (s, e) => Execute(); + Click += (_, _) => Execute(); } protected IList ParentMenuItems { get; private set; } diff --git a/MapUiTools/WinUI/MenuButton.WinUI.cs b/MapUiTools/WinUI/MenuButton.WinUI.cs index 6bc705fe..2c2af24a 100644 --- a/MapUiTools/WinUI/MenuButton.WinUI.cs +++ b/MapUiTools/WinUI/MenuButton.WinUI.cs @@ -15,7 +15,7 @@ namespace MapControl.UiTools public MenuButton() { Flyout = new MenuFlyout(); - Loaded += async (s, e) => await Initialize(); + Loaded += async (_, _) => await Initialize(); } public string Icon