Use lambda discard parameters

This commit is contained in:
ClemensFischer 2025-12-09 20:17:41 +01:00
parent 301ebacc58
commit 29ccf656cd
11 changed files with 17 additions and 17 deletions

View file

@ -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

View file

@ -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

View file

@ -46,7 +46,7 @@ namespace MapControl.UiTools
#if WPF
link.ToolTip = uri.ToString();
link.RequestNavigate += (s, e) =>
link.RequestNavigate += (_, e) =>
{
try
{

View file

@ -8,8 +8,8 @@ namespace MapControl.UiTools
{
protected MapMenuItem()
{
Loaded += (s, e) => Initialize();
Click += (s, e) => Execute();
Loaded += (_, _) => Initialize();
Click += (_, _) => Execute();
}
public string Text

View file

@ -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

View file

@ -14,13 +14,13 @@ namespace MapControl.UiTools
{
protected MapMenuItem()
{
Loaded += (s, e) =>
Loaded += (_, _) =>
{
ParentMenuItems = ((Panel)VisualTreeHelper.GetParent(this)).Children.OfType<MapMenuItem>().ToList();
Initialize();
};
Click += (s, e) => Execute();
Click += (_, _) => Execute();
}
protected IList<MapMenuItem> ParentMenuItems { get; private set; }

View file

@ -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