From 1e8d456009b39468cebc0bec501b5cf195035c06 Mon Sep 17 00:00:00 2001
From: A-Loot <105282948+A-Loot@users.noreply.github.com>
Date: Tue, 24 Oct 2023 16:20:30 +0200
Subject: [PATCH] Code Quality: Remove Async suffix from event methods (#13567)
---
src/Files.App/App.xaml.cs | 4 +-
src/Files.App/Data/Items/DriveItem.cs | 4 +-
src/Files.App/Data/Models/DrivesViewModel.cs | 16 +++---
src/Files.App/Data/Models/ItemViewModel.cs | 36 ++++++-------
src/Files.App/Dialogs/AddItemDialog.xaml | 2 +-
src/Files.App/Dialogs/AddItemDialog.xaml.cs | 2 +-
src/Files.App/Helpers/ShareItemHelpers.cs | 4 +-
src/Files.App/Helpers/UI/ThemeHelper.cs | 4 +-
src/Files.App/Services/UserSizeProvider.cs | 6 +--
.../FilePreviews/HtmlPreview.xaml | 2 +-
.../FilePreviews/HtmlPreview.xaml.cs | 2 +-
.../UserControls/PathBreadcrumb.xaml | 10 ++--
.../UserControls/PathBreadcrumb.xaml.cs | 12 ++---
src/Files.App/UserControls/TabBar/TabBar.xaml | 10 ++--
.../UserControls/TabBar/TabBar.xaml.cs | 10 ++--
.../UserControls/TabBar/TabBarItem.cs | 2 +-
.../UserControls/Widgets/DrivesWidget.xaml | 4 +-
.../UserControls/Widgets/DrivesWidget.xaml.cs | 10 ++--
.../UserControls/Widgets/FileTagsWidget.xaml | 2 +-
.../Widgets/FileTagsWidget.xaml.cs | 8 +--
.../UserControls/Widgets/HomePageWidget.cs | 6 +--
.../Widgets/QuickAccessWidget.xaml | 4 +-
.../Widgets/QuickAccessWidget.xaml.cs | 14 ++---
.../Widgets/RecentFilesWidget.xaml.cs | 12 ++---
.../Global/WindowsStorageDeviceWatcher.cs | 12 ++---
src/Files.App/ViewModels/MainPageViewModel.cs | 6 +--
.../Properties/BasePropertiesPage.cs | 2 +-
.../Properties/Items/FileProperties.cs | 4 +-
.../Properties/Items/FolderProperties.cs | 4 +-
.../UserControls/PreviewPaneViewModel.cs | 6 +--
.../UserControls/SidebarViewModel.cs | 54 +++++++++----------
.../UserControls/ToolbarViewModel.cs | 10 ++--
src/Files.App/Views/HomePage.xaml.cs | 22 ++++----
src/Files.App/Views/LayoutModes/BaseLayout.cs | 40 +++++++-------
.../Views/LayoutModes/ColumnViewBase.xaml | 6 +--
.../Views/LayoutModes/ColumnViewBase.xaml.cs | 10 ++--
.../LayoutModes/DetailsLayoutBrowser.xaml | 4 +-
.../LayoutModes/DetailsLayoutBrowser.xaml.cs | 8 +--
.../Views/LayoutModes/GridViewBrowser.xaml | 4 +-
.../Views/LayoutModes/GridViewBrowser.xaml.cs | 12 ++---
.../Views/LayoutModes/StandardLayoutMode.cs | 16 +++---
src/Files.App/Views/PaneHolderPage.xaml.cs | 4 +-
.../Views/Properties/CompatibilityPage.xaml | 2 +-
.../Properties/CompatibilityPage.xaml.cs | 4 +-
.../Views/Properties/DetailsPage.xaml | 4 +-
.../Views/Properties/DetailsPage.xaml.cs | 6 +--
.../Views/Properties/GeneralPage.xaml | 2 +-
.../Views/Properties/LibraryPage.xaml | 2 +-
.../Views/Properties/LibraryPage.xaml.cs | 4 +-
.../Properties/MainPropertiesPage.xaml.cs | 6 +--
.../Views/Properties/ShortcutPage.xaml | 2 +-
src/Files.App/Views/Settings/AboutPage.xaml | 2 +-
.../Views/Settings/AboutPage.xaml.cs | 2 +-
src/Files.App/Views/Shells/BaseShellPage.cs | 44 +++++++--------
.../Views/Shells/ColumnShellPage.xaml | 4 +-
.../Views/Shells/ColumnShellPage.xaml.cs | 8 +--
.../Views/Shells/ModernShellPage.xaml | 4 +-
.../Views/Shells/ModernShellPage.xaml.cs | 8 +--
.../FileTagsWidget/FileTagsWidgetViewModel.cs | 4 +-
59 files changed, 259 insertions(+), 259 deletions(-)
diff --git a/src/Files.App/App.xaml.cs b/src/Files.App/App.xaml.cs
index e7ec62d8ae24..3afb2b2a2527 100644
--- a/src/Files.App/App.xaml.cs
+++ b/src/Files.App/App.xaml.cs
@@ -264,7 +264,7 @@ private void EnsureSuperEarlyWindow()
// Hook events for the window
window.Activated += Window_Activated;
- window.Closed += Window_ClosedAsync;
+ window.Closed += Window_Closed;
// Attempt to activate it
window.Activate();
@@ -294,7 +294,7 @@ public void OnActivated(AppActivationArguments activatedEventArgs)
///
/// The source of the suspend request.
/// Details about the suspend request.
- private async void Window_ClosedAsync(object sender, WindowEventArgs args)
+ private async void Window_Closed(object sender, WindowEventArgs args)
{
// Save application state and stop any background activity
diff --git a/src/Files.App/Data/Items/DriveItem.cs b/src/Files.App/Data/Items/DriveItem.cs
index 6c448c38eb76..309020149080 100644
--- a/src/Files.App/Data/Items/DriveItem.cs
+++ b/src/Files.App/Data/Items/DriveItem.cs
@@ -214,12 +214,12 @@ public FrameworkElement? ItemDecorator
Width = 16
}
};
- itemDecorator.Click += ItemDecorator_ClickAsync;
+ itemDecorator.Click += ItemDecorator_Click;
return itemDecorator;
}
}
- private async void ItemDecorator_ClickAsync(object sender, RoutedEventArgs e)
+ private async void ItemDecorator_Click(object sender, RoutedEventArgs e)
{
var result = await DriveHelpers.EjectDeviceAsync(Path);
await UIHelpers.ShowDeviceEjectResultAsync(Type, result);
diff --git a/src/Files.App/Data/Models/DrivesViewModel.cs b/src/Files.App/Data/Models/DrivesViewModel.cs
index 03192103f697..f0b341196b11 100644
--- a/src/Files.App/Data/Models/DrivesViewModel.cs
+++ b/src/Files.App/Data/Models/DrivesViewModel.cs
@@ -40,17 +40,17 @@ public DrivesViewModel(IRemovableDrivesService removableDrivesService, ISizeProv
watcher = removableDrivesService.CreateWatcher();
watcher.DeviceAdded += Watcher_DeviceAdded;
watcher.DeviceRemoved += Watcher_DeviceRemoved;
- watcher.DeviceModified += Watcher_DeviceModifiedAsync;
- watcher.EnumerationCompleted += Watcher_EnumerationCompletedAsync;
+ watcher.DeviceModified += Watcher_DeviceModified;
+ watcher.EnumerationCompleted += Watcher_EnumerationCompleted;
}
- private async void Watcher_EnumerationCompletedAsync(object? sender, System.EventArgs e)
+ private async void Watcher_EnumerationCompleted(object? sender, System.EventArgs e)
{
logger.LogDebug("Watcher_EnumerationCompleted");
await folderSizeProvider.CleanAsync();
}
- private async void Watcher_DeviceModifiedAsync(object? sender, string e)
+ private async void Watcher_DeviceModified(object? sender, string e)
{
var matchingDriveEjected = Drives.FirstOrDefault(x => Path.GetFullPath(x.Path) == Path.GetFullPath(e));
if (matchingDriveEjected != null)
@@ -68,7 +68,7 @@ private void Watcher_DeviceRemoved(object? sender, string e)
}
// Update the collection on the ui-thread.
- Watcher_EnumerationCompletedAsync(null, EventArgs.Empty);
+ Watcher_EnumerationCompleted(null, EventArgs.Empty);
}
private void Watcher_DeviceAdded(object? sender, ILocatableFolder e)
@@ -90,7 +90,7 @@ private void Watcher_DeviceAdded(object? sender, ILocatableFolder e)
Drives.Add(e);
}
- Watcher_EnumerationCompletedAsync(null, EventArgs.Empty);
+ Watcher_EnumerationCompleted(null, EventArgs.Empty);
}
public async Task UpdateDrivesAsync()
@@ -116,8 +116,8 @@ public void Dispose()
watcher.Stop();
watcher.DeviceAdded -= Watcher_DeviceAdded;
watcher.DeviceRemoved -= Watcher_DeviceRemoved;
- watcher.DeviceModified -= Watcher_DeviceModifiedAsync;
- watcher.EnumerationCompleted -= Watcher_EnumerationCompletedAsync;
+ watcher.DeviceModified -= Watcher_DeviceModified;
+ watcher.EnumerationCompleted -= Watcher_EnumerationCompleted;
}
}
}
diff --git a/src/Files.App/Data/Models/ItemViewModel.cs b/src/Files.App/Data/Models/ItemViewModel.cs
index 8d8f8317a088..846a548607c5 100644
--- a/src/Files.App/Data/Models/ItemViewModel.cs
+++ b/src/Files.App/Data/Models/ItemViewModel.cs
@@ -431,10 +431,10 @@ public ItemViewModel(FolderSettingsViewModel folderSettingsViewModel)
enumFolderSemaphore = new SemaphoreSlim(1, 1);
dispatcherQueue = DispatcherQueue.GetForCurrentThread();
- UserSettingsService.OnSettingChangedEvent += UserSettingsService_OnSettingChangedEventAsync;
- fileTagsSettingsService.OnSettingImportedEvent += FileTagsSettingsService_OnSettingUpdatedAsync;
- fileTagsSettingsService.OnTagsUpdated += FileTagsSettingsService_OnSettingUpdatedAsync;
- folderSizeProvider.SizeChanged += FolderSizeProvider_SizeChangedAsync;
+ UserSettingsService.OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent;
+ fileTagsSettingsService.OnSettingImportedEvent += FileTagsSettingsService_OnSettingUpdated;
+ fileTagsSettingsService.OnTagsUpdated += FileTagsSettingsService_OnSettingUpdated;
+ folderSizeProvider.SizeChanged += FolderSizeProvider_SizeChanged;
RecycleBinManager.Default.RecycleBinItemCreated += RecycleBinItemCreatedAsync;
RecycleBinManager.Default.RecycleBinItemDeleted += RecycleBinItemDeletedAsync;
RecycleBinManager.Default.RecycleBinRefreshRequested += RecycleBinRefreshRequestedAsync;
@@ -482,7 +482,7 @@ private async void RecycleBinItemCreatedAsync(object sender, FileSystemEventArgs
await ApplySingleFileChangeAsync(newListedItem);
}
- private async void FolderSizeProvider_SizeChangedAsync(object? sender, SizeChangedEventArgs e)
+ private async void FolderSizeProvider_SizeChanged(object? sender, SizeChangedEventArgs e)
{
try
{
@@ -522,7 +522,7 @@ await dispatcherQueue.EnqueueOrInvokeAsync(() =>
}
}
- private async void FileTagsSettingsService_OnSettingUpdatedAsync(object? sender, EventArgs e)
+ private async void FileTagsSettingsService_OnSettingUpdated(object? sender, EventArgs e)
{
await dispatcherQueue.EnqueueOrInvokeAsync(() =>
{
@@ -531,7 +531,7 @@ await dispatcherQueue.EnqueueOrInvokeAsync(() =>
});
}
- private async void UserSettingsService_OnSettingChangedEventAsync(object? sender, SettingChangedEventArgs e)
+ private async void UserSettingsService_OnSettingChangedEvent(object? sender, SettingChangedEventArgs e)
{
switch (e.SettingName)
{
@@ -1792,14 +1792,14 @@ await Task.Factory.StartNew(() =>
if (rootFolder.AreQueryOptionsSupported(options))
{
var itemQueryResult = rootFolder.CreateItemQueryWithOptions(options).ToStorageItemQueryResult();
- itemQueryResult.ContentsChanged += ItemQueryResult_ContentsChangedAsync;
+ itemQueryResult.ContentsChanged += ItemQueryResult_ContentsChanged;
// Just get one item to start getting notifications
var watchedItemsOperation = itemQueryResult.GetItemsAsync(0, 1);
watcherCTS.Token.Register(() =>
{
- itemQueryResult.ContentsChanged -= ItemQueryResult_ContentsChangedAsync;
+ itemQueryResult.ContentsChanged -= ItemQueryResult_ContentsChanged;
watchedItemsOperation?.Cancel();
});
}
@@ -1820,14 +1820,14 @@ private void WatchForWin32FolderChanges(string? folderPath)
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName
};
- watcher.Created += DirectoryWatcher_ChangedAsync;
- watcher.Deleted += DirectoryWatcher_ChangedAsync;
- watcher.Renamed += DirectoryWatcher_ChangedAsync;
+ watcher.Created += DirectoryWatcher_Changed;
+ watcher.Deleted += DirectoryWatcher_Changed;
+ watcher.Renamed += DirectoryWatcher_Changed;
watcher.EnableRaisingEvents = true;
}
}
- private async void DirectoryWatcher_ChangedAsync(object sender, FileSystemEventArgs e)
+ private async void DirectoryWatcher_Changed(object sender, FileSystemEventArgs e)
{
Debug.WriteLine($"Directory watcher event: {e.ChangeType}, {e.FullPath}");
@@ -1837,7 +1837,7 @@ await dispatcherQueue.EnqueueOrInvokeAsync(() =>
});
}
- private async void ItemQueryResult_ContentsChangedAsync(IStorageQueryResultBase sender, object args)
+ private async void ItemQueryResult_ContentsChanged(IStorageQueryResultBase sender, object args)
{
// Query options have to be reapplied otherwise old results are returned
var options = new QueryOptions()
@@ -2461,10 +2461,10 @@ public void Dispose()
RecycleBinManager.Default.RecycleBinItemCreated -= RecycleBinItemCreatedAsync;
RecycleBinManager.Default.RecycleBinItemDeleted -= RecycleBinItemDeletedAsync;
RecycleBinManager.Default.RecycleBinRefreshRequested -= RecycleBinRefreshRequestedAsync;
- UserSettingsService.OnSettingChangedEvent -= UserSettingsService_OnSettingChangedEventAsync;
- fileTagsSettingsService.OnSettingImportedEvent -= FileTagsSettingsService_OnSettingUpdatedAsync;
- fileTagsSettingsService.OnTagsUpdated -= FileTagsSettingsService_OnSettingUpdatedAsync;
- folderSizeProvider.SizeChanged -= FolderSizeProvider_SizeChangedAsync;
+ UserSettingsService.OnSettingChangedEvent -= UserSettingsService_OnSettingChangedEvent;
+ fileTagsSettingsService.OnSettingImportedEvent -= FileTagsSettingsService_OnSettingUpdated;
+ fileTagsSettingsService.OnTagsUpdated -= FileTagsSettingsService_OnSettingUpdated;
+ folderSizeProvider.SizeChanged -= FolderSizeProvider_SizeChanged;
DefaultIcons.Clear();
}
}
diff --git a/src/Files.App/Dialogs/AddItemDialog.xaml b/src/Files.App/Dialogs/AddItemDialog.xaml
index aee00ba2d8cd..8f47a4ab9324 100644
--- a/src/Files.App/Dialogs/AddItemDialog.xaml
+++ b/src/Files.App/Dialogs/AddItemDialog.xaml
@@ -13,7 +13,7 @@
Grid.RowSpan="4"
BorderThickness="0"
CornerRadius="{StaticResource OverlayCornerRadius}"
- Loaded="AddItemDialog_LoadedAsync"
+ Loaded="AddItemDialog_Loaded"
RequestedTheme="{x:Bind helpers:ThemeHelper.RootTheme}"
SecondaryButtonText="{helpers:ResourceString Name=Cancel}"
Style="{StaticResource DefaultContentDialogStyle}"
diff --git a/src/Files.App/Dialogs/AddItemDialog.xaml.cs b/src/Files.App/Dialogs/AddItemDialog.xaml.cs
index d4c9166e5975..7bc71af5aa55 100644
--- a/src/Files.App/Dialogs/AddItemDialog.xaml.cs
+++ b/src/Files.App/Dialogs/AddItemDialog.xaml.cs
@@ -35,7 +35,7 @@ private void ListView_ItemClick(object sender, ItemClickEventArgs e)
Hide();
}
- private async void AddItemDialog_LoadedAsync(object sender, RoutedEventArgs e)
+ private async void AddItemDialog_Loaded(object sender, RoutedEventArgs e)
{
var itemTypes = addItemService.GetEntries();
await ViewModel.AddItemsToListAsync(itemTypes);
diff --git a/src/Files.App/Helpers/ShareItemHelpers.cs b/src/Files.App/Helpers/ShareItemHelpers.cs
index e378dafdce30..63ef8079b106 100644
--- a/src/Files.App/Helpers/ShareItemHelpers.cs
+++ b/src/Files.App/Helpers/ShareItemHelpers.cs
@@ -25,11 +25,11 @@ public static void ShareItems(IEnumerable itemsToShare)
IntPtr result = interop.GetForWindow(MainWindow.Instance.WindowHandle, InteropHelpers.DataTransferManagerInteropIID);
var manager = WinRT.MarshalInterface.FromAbi(result);
- manager.DataRequested += new TypedEventHandler(Manager_DataRequestedAsync);
+ manager.DataRequested += new TypedEventHandler(Manager_DataRequested);
interop.ShowShareUIForWindow(MainWindow.Instance.WindowHandle);
- async void Manager_DataRequestedAsync(DataTransferManager sender, DataRequestedEventArgs args)
+ async void Manager_DataRequested(DataTransferManager sender, DataRequestedEventArgs args)
{
DataRequestDeferral dataRequestDeferral = args.Request.GetDeferral();
List items = new();
diff --git a/src/Files.App/Helpers/UI/ThemeHelper.cs b/src/Files.App/Helpers/UI/ThemeHelper.cs
index fc7f0ce74df8..646abd68098c 100644
--- a/src/Files.App/Helpers/UI/ThemeHelper.cs
+++ b/src/Files.App/Helpers/UI/ThemeHelper.cs
@@ -62,7 +62,7 @@ public static bool Initialize()
// Registering to color changes, thus we notice when user changes theme system wide
UiSettings = new UISettings();
- UiSettings.ColorValuesChanged += UiSettings_ColorValuesChangedAsync;
+ UiSettings.ColorValuesChanged += UiSettings_ColorValuesChanged;
return true;
}
@@ -77,7 +77,7 @@ public static void ApplyResources()
ApplyTheme();
}
- private static async void UiSettings_ColorValuesChangedAsync(UISettings sender, object args)
+ private static async void UiSettings_ColorValuesChanged(UISettings sender, object args)
{
// Make sure we have a reference to our window so we dispatch a UI change
if (currentApplicationWindow is null)
diff --git a/src/Files.App/Services/UserSizeProvider.cs b/src/Files.App/Services/UserSizeProvider.cs
index 8523f97d50c0..d3311f7ecc61 100644
--- a/src/Files.App/Services/UserSizeProvider.cs
+++ b/src/Files.App/Services/UserSizeProvider.cs
@@ -19,7 +19,7 @@ public UserSizeProvider()
provider = GetProvider();
provider.SizeChanged += Provider_SizeChanged;
- folderPreferences.PropertyChanged += FolderPreferences_PropertyChangedAsync;
+ folderPreferences.PropertyChanged += FolderPreferences_PropertyChanged;
}
public Task CleanAsync()
@@ -37,13 +37,13 @@ public bool TryGetSize(string path, out ulong size)
public void Dispose()
{
provider.Dispose();
- folderPreferences.PropertyChanged -= FolderPreferences_PropertyChangedAsync;
+ folderPreferences.PropertyChanged -= FolderPreferences_PropertyChanged;
}
private ISizeProvider GetProvider()
=> folderPreferences.CalculateFolderSizes ? new DrivesSizeProvider() : new NoSizeProvider();
- private async void FolderPreferences_PropertyChangedAsync(object sender, PropertyChangedEventArgs e)
+ private async void FolderPreferences_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName is nameof(IFoldersSettingsService.CalculateFolderSizes))
{
diff --git a/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml b/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml
index 0d976f1ea3de..1d8225f544e2 100644
--- a/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml
+++ b/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml
@@ -20,7 +20,7 @@
x:Name="WebViewControl"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
- Loaded="WebViewControl_LoadedAsync" />
+ Loaded="WebViewControl_Loaded" />
diff --git a/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml.cs b/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml.cs
index c9c08ddfc791..097208fd9818 100644
--- a/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml.cs
+++ b/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml.cs
@@ -16,7 +16,7 @@ public HtmlPreview(HtmlPreviewViewModel model)
public HtmlPreviewViewModel ViewModel { get; set; }
- private async void WebViewControl_LoadedAsync(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
+ private async void WebViewControl_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
{
await WebViewControl.EnsureCoreWebView2Async();
WebViewControl.CoreWebView2.SetVirtualHostNameToFolderMapping(
diff --git a/src/Files.App/UserControls/PathBreadcrumb.xaml b/src/Files.App/UserControls/PathBreadcrumb.xaml
index 396f904a717d..92a0d9dbbcac 100644
--- a/src/Files.App/UserControls/PathBreadcrumb.xaml
+++ b/src/Files.App/UserControls/PathBreadcrumb.xaml
@@ -28,8 +28,8 @@
AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"
Background="Transparent"
DragLeave="PathBoxItem_DragLeave"
- DragOver="PathBoxItem_DragOverAsync"
- Drop="PathBoxItem_DropAsync"
+ DragOver="PathBoxItem_DragOver"
+ Drop="PathBoxItem_Drop"
Orientation="Horizontal"
Spacing="4"
Tag="{x:Bind Path, Mode=OneWay}">
@@ -60,8 +60,8 @@
AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"
Background="Transparent"
DragLeave="PathBoxItem_DragLeave"
- DragOver="PathBoxItem_DragOverAsync"
- Drop="PathBoxItem_DropAsync"
+ DragOver="PathBoxItem_DragOver"
+ Drop="PathBoxItem_Drop"
Orientation="Horizontal"
Spacing="4"
Tag="{x:Bind Path, Mode=OneWay}">
@@ -71,7 +71,7 @@
Padding="0,4"
FontSize="12"
PointerPressed="PathBoxItem_PointerPressed"
- Tapped="PathBoxItem_TappedAsync"
+ Tapped="PathBoxItem_Tapped"
Text="{x:Bind Title, Mode=OneWay}">
diff --git a/src/Files.App/UserControls/PathBreadcrumb.xaml.cs b/src/Files.App/UserControls/PathBreadcrumb.xaml.cs
index bd83f8816736..7ee8dd17d0be 100644
--- a/src/Files.App/UserControls/PathBreadcrumb.xaml.cs
+++ b/src/Files.App/UserControls/PathBreadcrumb.xaml.cs
@@ -30,19 +30,19 @@ private void PathBoxItem_DragLeave(object sender, DragEventArgs e)
ViewModel.PathBoxItem_DragLeave(sender, e);
}
- private async void PathBoxItem_DragOverAsync(object sender, DragEventArgs e)
+ private async void PathBoxItem_DragOver(object sender, DragEventArgs e)
{
- await ViewModel.PathBoxItem_DragOverAsync(sender, e);
+ await ViewModel.PathBoxItem_DragOver(sender, e);
}
- private async void PathBoxItem_DropAsync(object sender, DragEventArgs e)
+ private async void PathBoxItem_Drop(object sender, DragEventArgs e)
{
- await ViewModel.PathBoxItem_DropAsync(sender, e);
+ await ViewModel.PathBoxItem_Drop(sender, e);
}
- private async void PathBoxItem_TappedAsync(object sender, TappedRoutedEventArgs e)
+ private async void PathBoxItem_Tapped(object sender, TappedRoutedEventArgs e)
{
- await ViewModel.PathBoxItem_TappedAsync(sender, e);
+ await ViewModel.PathBoxItem_Tapped(sender, e);
}
private void PathBoxItem_PointerPressed(object sender, PointerRoutedEventArgs e)
diff --git a/src/Files.App/UserControls/TabBar/TabBar.xaml b/src/Files.App/UserControls/TabBar/TabBar.xaml
index 1e10880bb312..efdd15677cf8 100644
--- a/src/Files.App/UserControls/TabBar/TabBar.xaml
+++ b/src/Files.App/UserControls/TabBar/TabBar.xaml
@@ -79,11 +79,11 @@
TabCloseRequested="TabView_TabCloseRequested"
TabDragCompleted="TabView_TabDragCompleted"
TabDragStarting="TabView_TabDragStarting"
- TabDroppedOutside="TabView_TabDroppedOutsideAsync"
+ TabDroppedOutside="TabView_TabDroppedOutside"
TabItemsChanged="TabView_TabItemsChanged"
TabItemsSource="{x:Bind Items, Mode=OneWay}"
TabStripDragOver="TabView_TabStripDragOver"
- TabStripDrop="TabView_TabStripDropAsync"
+ TabStripDrop="TabView_TabStripDrop"
Visibility="{x:Bind TabStripVisibility, Mode=OneWay}">
@@ -92,9 +92,9 @@
();
- ContentChanged -= mainPageViewModel.Control_ContentChangedAsync;
+ ContentChanged -= mainPageViewModel.Control_ContentChanged;
Dispose();
}
diff --git a/src/Files.App/UserControls/Widgets/DrivesWidget.xaml b/src/Files.App/UserControls/Widgets/DrivesWidget.xaml
index 460e25c8520d..086bbf5a898d 100644
--- a/src/Files.App/UserControls/Widgets/DrivesWidget.xaml
+++ b/src/Files.App/UserControls/Widgets/DrivesWidget.xaml
@@ -35,10 +35,10 @@
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AutomationProperties.Name="{x:Bind Item.Text, Mode=OneWay}"
- Click="Button_ClickAsync"
+ Click="Button_Click"
CornerRadius="{StaticResource ControlCornerRadius}"
DataContext="{x:Bind}"
- PointerPressed="Button_PointerPressedAsync"
+ PointerPressed="Button_PointerPressed"
RightTapped="Button_RightTapped"
Tag="{x:Bind Item.Path}"
ToolTipService.ToolTip="{x:Bind Item.Text, Mode=OneWay}">
diff --git a/src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs b/src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs
index fd4b947c05b8..efe9201a5e15 100644
--- a/src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs
+++ b/src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs
@@ -122,9 +122,9 @@ public DrivesWidget()
{
InitializeComponent();
- Drives_CollectionChangedAsync(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Drives_CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
- drivesViewModel.Drives.CollectionChanged += Drives_CollectionChangedAsync;
+ drivesViewModel.Drives.CollectionChanged += Drives_CollectionChanged;
FormatDriveCommand = new RelayCommand(FormatDrive);
EjectDeviceCommand = new AsyncRelayCommand(EjectDeviceAsync);
@@ -138,7 +138,7 @@ public DrivesWidget()
DisconnectNetworkDriveCommand = new RelayCommand(DisconnectNetworkDrive);
}
- private async void Drives_CollectionChangedAsync(object? sender, NotifyCollectionChangedEventArgs e)
+ private async void Drives_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
await DispatcherQueue.EnqueueOrInvokeAsync(async () =>
{
@@ -303,7 +303,7 @@ private void OpenProperties(DriveCardItem item)
ItemContextMenuFlyout.Closed += flyoutClosed;
}
- private async void Button_ClickAsync(object sender, RoutedEventArgs e)
+ private async void Button_Click(object sender, RoutedEventArgs e)
{
string ClickedCard = (sender as Button).Tag.ToString();
string NavigationPath = ClickedCard; // path to navigate
@@ -324,7 +324,7 @@ private async void Button_ClickAsync(object sender, RoutedEventArgs e)
});
}
- private async void Button_PointerPressedAsync(object sender, PointerRoutedEventArgs e)
+ private async void Button_PointerPressed(object sender, PointerRoutedEventArgs e)
{
if (!e.GetCurrentPoint(null).Properties.IsMiddleButtonPressed) // check middle click
return;
diff --git a/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml b/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml
index e64c113fa2bc..e5e035a46b2f 100644
--- a/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml
+++ b/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml
@@ -119,7 +119,7 @@
HorizontalAlignment="Stretch"
DesiredWidth="180"
IsItemClickEnabled="True"
- ItemClick="FileTagItem_ItemClickAsync"
+ ItemClick="FileTagItem_ItemClick"
ItemsSource="{x:Bind Tags}"
RightTapped="AdaptiveGridView_RightTapped"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
diff --git a/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml.cs b/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml.cs
index ea9c482dffd1..d51d6a8d9d32 100644
--- a/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml.cs
+++ b/src/Files.App/UserControls/Widgets/FileTagsWidget.xaml.cs
@@ -93,7 +93,7 @@ private void OpenInNewPane(WidgetCardItem? item)
});
}
- private async void FileTagItem_ItemClickAsync(object sender, ItemClickEventArgs e)
+ private async void FileTagItem_ItemClick(object sender, ItemClickEventArgs e)
{
if (e.ClickedItem is FileTagsItemViewModel itemViewModel)
await itemViewModel.ClickCommand.ExecuteAsync(null);
@@ -134,16 +134,16 @@ private void LoadContextMenu(
if (rightClickedItem is not null)
{
FlyouItemPath = rightClickedItem.Path;
- ItemContextMenuFlyout.Opened += ItemContextMenuFlyout_OpenedAsync;
+ ItemContextMenuFlyout.Opened += ItemContextMenuFlyout_Opened;
}
itemContextMenuFlyout.ShowAt(element, new FlyoutShowOptions { Position = e.GetPosition(element) });
e.Handled = true;
}
- private async void ItemContextMenuFlyout_OpenedAsync(object? sender, object e)
+ private async void ItemContextMenuFlyout_Opened(object? sender, object e)
{
- ItemContextMenuFlyout.Opened -= ItemContextMenuFlyout_OpenedAsync;
+ ItemContextMenuFlyout.Opened -= ItemContextMenuFlyout_Opened;
await ShellContextmenuHelper.LoadShellMenuItemsAsync(FlyouItemPath, ItemContextMenuFlyout, showOpenWithMenu: true, showSendToMenu: true);
}
diff --git a/src/Files.App/UserControls/Widgets/HomePageWidget.cs b/src/Files.App/UserControls/Widgets/HomePageWidget.cs
index 5104495baa30..cee8a410444a 100644
--- a/src/Files.App/UserControls/Widgets/HomePageWidget.cs
+++ b/src/Files.App/UserControls/Widgets/HomePageWidget.cs
@@ -47,15 +47,15 @@ public void Button_RightTapped(object sender, RightTappedRoutedEventArgs e)
secondaryElements.ForEach(i => itemContextMenuFlyout.SecondaryCommands.Add(i));
ItemContextMenuFlyout = itemContextMenuFlyout;
FlyouItemPath = item.Path;
- ItemContextMenuFlyout.Opened += ItemContextMenuFlyout_OpenedAsync;
+ ItemContextMenuFlyout.Opened += ItemContextMenuFlyout_Opened;
itemContextMenuFlyout.ShowAt(widgetCardItem, new FlyoutShowOptions { Position = e.GetPosition(widgetCardItem) });
e.Handled = true;
}
- private async void ItemContextMenuFlyout_OpenedAsync(object? sender, object e)
+ private async void ItemContextMenuFlyout_Opened(object? sender, object e)
{
- ItemContextMenuFlyout.Opened -= ItemContextMenuFlyout_OpenedAsync;
+ ItemContextMenuFlyout.Opened -= ItemContextMenuFlyout_Opened;
await ShellContextmenuHelper.LoadShellMenuItemsAsync(FlyouItemPath, ItemContextMenuFlyout);
}
diff --git a/src/Files.App/UserControls/Widgets/QuickAccessWidget.xaml b/src/Files.App/UserControls/Widgets/QuickAccessWidget.xaml
index 0f65dd904787..363994e5fc2c 100644
--- a/src/Files.App/UserControls/Widgets/QuickAccessWidget.xaml
+++ b/src/Files.App/UserControls/Widgets/QuickAccessWidget.xaml
@@ -34,10 +34,10 @@
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AutomationProperties.Name="{x:Bind AutomationProperties}"
- Click="Button_ClickAsync"
+ Click="Button_Click"
CornerRadius="{StaticResource ControlCornerRadius}"
DataContext="{x:Bind}"
- PointerPressed="Button_PointerPressedAsync"
+ PointerPressed="Button_PointerPressed"
RightTapped="Button_RightTapped"
Tag="{x:Bind Path}">
(OpenInNewTabAsync);
@@ -281,9 +281,9 @@ await DispatcherQueue.EnqueueOrInvokeAsync(async () =>
});
}
- private async void QuickAccessWidget_LoadedAsync(object sender, RoutedEventArgs e)
+ private async void QuickAccessWidget_Loaded(object sender, RoutedEventArgs e)
{
- Loaded -= QuickAccessWidget_LoadedAsync;
+ Loaded -= QuickAccessWidget_Loaded;
var itemsToAdd = await QuickAccessService.GetPinnedFoldersAsync();
ModifyItemAsync(this, new ModifyQuickAccessEventArgs(itemsToAdd.ToArray(), false)
@@ -300,7 +300,7 @@ private void QuickAccessWidget_Unloaded(object sender, RoutedEventArgs e)
App.QuickAccessManager.UpdateQuickAccessWidget -= ModifyItemAsync;
}
- private static async void ItemsAdded_CollectionChangedAsync(object? sender, NotifyCollectionChangedEventArgs e)
+ private static async void ItemsAdded_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
if (e.Action is NotifyCollectionChangedAction.Add)
{
@@ -330,7 +330,7 @@ private void OpenInNewPane(FolderCardItem item)
CardNewPaneInvoked?.Invoke(this, new QuickAccessCardInvokedEventArgs { Path = item.Path });
}
- private async void Button_PointerPressedAsync(object sender, PointerRoutedEventArgs e)
+ private async void Button_PointerPressed(object sender, PointerRoutedEventArgs e)
{
if (e.GetCurrentPoint(null).Properties.IsMiddleButtonPressed) // check middle click
{
@@ -376,7 +376,7 @@ public override async Task UnpinFromFavoritesAsync(WidgetCardItem item)
ModifyItemAsync(this, new ModifyQuickAccessEventArgs(new[] { item.Path }, false));
}
- private async void Button_ClickAsync(object sender, RoutedEventArgs e)
+ private async void Button_Click(object sender, RoutedEventArgs e)
{
string ClickedCard = (sender as Button).Tag.ToString();
string NavigationPath = ClickedCard; // path to navigate
diff --git a/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml.cs b/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml.cs
index 4fb65f1134e7..65034b122693 100644
--- a/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml.cs
+++ b/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml.cs
@@ -99,7 +99,7 @@ public RecentFilesWidget()
// recent files could have changed while widget wasn't loaded
_ = RefreshWidgetAsync();
- App.RecentItemsManager.RecentFilesChanged += Manager_RecentFilesChangedAsync;
+ App.RecentItemsManager.RecentFilesChanged += Manager_RecentFilesChanged;
RemoveRecentItemCommand = new AsyncRelayCommand(RemoveRecentItemAsync);
ClearAllItemsCommand = new AsyncRelayCommand(ClearRecentItemsAsync);
@@ -122,13 +122,13 @@ private void ListView_RightTapped(object sender, RightTappedRoutedEventArgs e)
secondaryElements.ForEach(i => ItemContextMenuFlyout.SecondaryCommands.Add(i));
FlyouItemPath = item.Path;
- ItemContextMenuFlyout.Opened += ItemContextMenuFlyout_OpenedAsync;
+ ItemContextMenuFlyout.Opened += ItemContextMenuFlyout_Opened;
ItemContextMenuFlyout.ShowAt(element, new FlyoutShowOptions { Position = e.GetPosition(element) });
}
- private async void ItemContextMenuFlyout_OpenedAsync(object? sender, object e)
+ private async void ItemContextMenuFlyout_Opened(object? sender, object e)
{
- ItemContextMenuFlyout.Opened -= ItemContextMenuFlyout_OpenedAsync;
+ ItemContextMenuFlyout.Opened -= ItemContextMenuFlyout_Opened;
await ShellContextmenuHelper.LoadShellMenuItemsAsync(FlyouItemPath, ItemContextMenuFlyout, showOpenWithMenu: true, showSendToMenu: true);
}
@@ -204,7 +204,7 @@ public async Task RefreshWidgetAsync()
await App.RecentItemsManager.UpdateRecentFilesAsync();
}
- private async void Manager_RecentFilesChangedAsync(object sender, NotifyCollectionChangedEventArgs e)
+ private async void Manager_RecentFilesChanged(object sender, NotifyCollectionChangedEventArgs e)
{
await DispatcherQueue.EnqueueOrInvokeAsync(async () =>
{
@@ -376,7 +376,7 @@ private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
public void Dispose()
{
- App.RecentItemsManager.RecentFilesChanged -= Manager_RecentFilesChangedAsync;
+ App.RecentItemsManager.RecentFilesChanged -= Manager_RecentFilesChanged;
}
}
}
\ No newline at end of file
diff --git a/src/Files.App/Utils/Global/WindowsStorageDeviceWatcher.cs b/src/Files.App/Utils/Global/WindowsStorageDeviceWatcher.cs
index 52269d94bb22..f07a8be28003 100644
--- a/src/Files.App/Utils/Global/WindowsStorageDeviceWatcher.cs
+++ b/src/Files.App/Utils/Global/WindowsStorageDeviceWatcher.cs
@@ -27,7 +27,7 @@ public class WindowsStorageDeviceWatcher : IStorageDeviceWatcher
public WindowsStorageDeviceWatcher()
{
watcher = DeviceInformation.CreateWatcher(StorageDevice.GetDeviceSelector());
- watcher.Added += Watcher_AddedAsync;
+ watcher.Added += Watcher_Added;
watcher.Removed += Watcher_Removed;
watcher.EnumerationCompleted += Watcher_EnumerationCompleted;
@@ -36,7 +36,7 @@ public WindowsStorageDeviceWatcher()
private void SetupWin32Watcher()
{
- DeviceManager.Default.DeviceAdded += Win32_OnDeviceAddedAsync;
+ DeviceManager.Default.DeviceAdded += Win32_OnDeviceAdded;
DeviceManager.Default.DeviceRemoved += Win32_OnDeviceRemoved;
DeviceManager.Default.DeviceInserted += Win32_OnDeviceEjectedOrInserted;
DeviceManager.Default.DeviceEjected += Win32_OnDeviceEjectedOrInserted;
@@ -52,7 +52,7 @@ private void Win32_OnDeviceRemoved(object? sender, DeviceEventArgs e)
DeviceRemoved?.Invoke(this, e.DeviceId);
}
- private async void Win32_OnDeviceAddedAsync(object? sender, DeviceEventArgs e)
+ private async void Win32_OnDeviceAdded(object? sender, DeviceEventArgs e)
{
var driveAdded = new DriveInfo(e.DeviceId);
var rootAdded = await FilesystemTasks.Wrap(() => StorageFolder.GetFolderFromPathAsync(e.DeviceId).AsTask());
@@ -80,7 +80,7 @@ private void Watcher_Removed(DeviceWatcher sender, DeviceInformationUpdate args)
DeviceRemoved?.Invoke(this, args.Id);
}
- private async void Watcher_AddedAsync(DeviceWatcher sender, DeviceInformation args)
+ private async void Watcher_Added(DeviceWatcher sender, DeviceInformation args)
{
string deviceId = args.Id;
StorageFolder root;
@@ -127,11 +127,11 @@ public void Stop()
watcher.Stop();
}
- watcher.Added -= Watcher_AddedAsync;
+ watcher.Added -= Watcher_Added;
watcher.Removed -= Watcher_Removed;
watcher.EnumerationCompleted -= Watcher_EnumerationCompleted;
- DeviceManager.Default.DeviceAdded -= Win32_OnDeviceAddedAsync;
+ DeviceManager.Default.DeviceAdded -= Win32_OnDeviceAdded;
DeviceManager.Default.DeviceRemoved -= Win32_OnDeviceRemoved;
DeviceManager.Default.DeviceInserted -= Win32_OnDeviceEjectedOrInserted;
DeviceManager.Default.DeviceEjected -= Win32_OnDeviceEjectedOrInserted;
diff --git a/src/Files.App/ViewModels/MainPageViewModel.cs b/src/Files.App/ViewModels/MainPageViewModel.cs
index 59ae6d10f4fc..2e862bc0c162 100644
--- a/src/Files.App/ViewModels/MainPageViewModel.cs
+++ b/src/Files.App/ViewModels/MainPageViewModel.cs
@@ -126,7 +126,7 @@ public async Task AddNewTabByPathAsync(Type type, string? path, int atIndex = -1
InitialPageType = type,
NavigationParameter = path
};
- tabItem.ContentChanged += Control_ContentChangedAsync;
+ tabItem.ContentChanged += Control_ContentChanged;
await UpdateTabInfoAsync(tabItem, path);
var index = atIndex == -1 ? AppInstances.Count : atIndex;
AppInstances.Insert(index, tabItem);
@@ -421,7 +421,7 @@ public async Task AddNewTabByParamAsync(Type type, object tabViewItemArgs, int a
NavigationParameter = tabViewItemArgs
};
- tabItem.ContentChanged += Control_ContentChangedAsync;
+ tabItem.ContentChanged += Control_ContentChanged;
await UpdateTabInfoAsync(tabItem, tabViewItemArgs);
@@ -430,7 +430,7 @@ public async Task AddNewTabByParamAsync(Type type, object tabViewItemArgs, int a
App.AppModel.TabStripSelectedIndex = index;
}
- public async void Control_ContentChangedAsync(object? sender, CustomTabViewItemParameter e)
+ public async void Control_ContentChanged(object? sender, CustomTabViewItemParameter e)
{
if (sender is null)
return;
diff --git a/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs b/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs
index fb3726978511..fb71e25e2c9f 100644
--- a/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs
+++ b/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs
@@ -16,7 +16,7 @@ public abstract class BasePropertiesPage : Page, IDisposable
public SelectedItemsPropertiesViewModel ViewModel { get; set; } = new();
- protected virtual void Properties_LoadedAsync(object sender, RoutedEventArgs e)
+ protected virtual void Properties_Loaded(object sender, RoutedEventArgs e)
{
BaseProperties?.GetSpecialPropertiesAsync();
}
diff --git a/src/Files.App/ViewModels/Properties/Items/FileProperties.cs b/src/Files.App/ViewModels/Properties/Items/FileProperties.cs
index 1bc9e1e53981..f06d0666d896 100644
--- a/src/Files.App/ViewModels/Properties/Items/FileProperties.cs
+++ b/src/Files.App/ViewModels/Properties/Items/FileProperties.cs
@@ -26,7 +26,7 @@ public FileProperties(
GetBaseProperties();
- ViewModel.PropertyChanged += ViewModel_PropertyChangedAsync;
+ ViewModel.PropertyChanged += ViewModel_PropertyChanged;
}
public override void GetBaseProperties()
@@ -257,7 +257,7 @@ public async Task ClearPropertiesAsync()
_ = GetSystemFilePropertiesAsync();
}
- private async void ViewModel_PropertyChangedAsync(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ private async void ViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
switch (e.PropertyName)
{
diff --git a/src/Files.App/ViewModels/Properties/Items/FolderProperties.cs b/src/Files.App/ViewModels/Properties/Items/FolderProperties.cs
index 24e9d197036b..117dbc0e519f 100644
--- a/src/Files.App/ViewModels/Properties/Items/FolderProperties.cs
+++ b/src/Files.App/ViewModels/Properties/Items/FolderProperties.cs
@@ -27,7 +27,7 @@ public FolderProperties(
GetBaseProperties();
- ViewModel.PropertyChanged += ViewModel_PropertyChangedAsync;
+ ViewModel.PropertyChanged += ViewModel_PropertyChanged;
}
public override void GetBaseProperties()
@@ -186,7 +186,7 @@ private async Task GetFolderSizeAsync(string folderPath, CancellationToken token
SetItemsCountString();
}
- private async void ViewModel_PropertyChangedAsync(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ private async void ViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
switch (e.PropertyName)
{
diff --git a/src/Files.App/ViewModels/UserControls/PreviewPaneViewModel.cs b/src/Files.App/ViewModels/UserControls/PreviewPaneViewModel.cs
index 7b876b52a7f1..0cc32265f272 100644
--- a/src/Files.App/ViewModels/UserControls/PreviewPaneViewModel.cs
+++ b/src/Files.App/ViewModels/UserControls/PreviewPaneViewModel.cs
@@ -98,7 +98,7 @@ public PreviewPaneViewModel(IPreviewPaneSettingsService previewSettings, IConten
IsEnabled = previewSettingsService.IsEnabled;
- previewSettingsService.PropertyChanged += PreviewSettingsService_OnPropertyChangedEventAsync;
+ previewSettingsService.PropertyChanged += PreviewSettingsService_OnPropertyChangedEvent;
this.contentPageContextService = contentPageContextService ?? Ioc.Default.GetRequiredService();
}
@@ -355,7 +355,7 @@ public void UpdateDateDisplay()
public ICommand ShowPreviewOnlyInvoked { get; }
- private async void PreviewSettingsService_OnPropertyChangedEventAsync(object sender, PropertyChangedEventArgs e)
+ private async void PreviewSettingsService_OnPropertyChangedEvent(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName is nameof(IPreviewPaneSettingsService.ShowPreviewOnly))
{
@@ -408,7 +408,7 @@ private void UpdateTagsItems()
public void Dispose()
{
- previewSettingsService.PropertyChanged -= PreviewSettingsService_OnPropertyChangedEventAsync;
+ previewSettingsService.PropertyChanged -= PreviewSettingsService_OnPropertyChangedEvent;
}
}
}
diff --git a/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs b/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs
index 6aee1824e4a8..77fc35799aba 100644
--- a/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs
+++ b/src/Files.App/ViewModels/UserControls/SidebarViewModel.cs
@@ -239,21 +239,21 @@ public SidebarViewModel()
UserSettingsService.OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent;
CreateItemHomeAsync();
- Manager_DataChangedAsync(SectionType.Favorites, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
- Manager_DataChangedAsync(SectionType.Library, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
- Manager_DataChangedAsync(SectionType.Drives, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
- Manager_DataChangedAsync(SectionType.CloudDrives, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
- Manager_DataChangedAsync(SectionType.Network, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
- Manager_DataChangedAsync(SectionType.WSL, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
- Manager_DataChangedAsync(SectionType.FileTag, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
-
- App.QuickAccessManager.Model.DataChanged += Manager_DataChangedAsync;
- App.LibraryManager.DataChanged += Manager_DataChangedAsync;
- drivesViewModel.Drives.CollectionChanged += (x, args) => Manager_DataChangedAsync(SectionType.Drives, args);
- App.CloudDrivesManager.DataChanged += Manager_DataChangedAsync;
- networkDrivesViewModel.Drives.CollectionChanged += (x, args) => Manager_DataChangedAsync(SectionType.Network, args);
- App.WSLDistroManager.DataChanged += Manager_DataChangedAsync;
- App.FileTagsManager.DataChanged += Manager_DataChangedAsync;
+ Manager_DataChanged(SectionType.Favorites, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Manager_DataChanged(SectionType.Library, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Manager_DataChanged(SectionType.Drives, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Manager_DataChanged(SectionType.CloudDrives, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Manager_DataChanged(SectionType.Network, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Manager_DataChanged(SectionType.WSL, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Manager_DataChanged(SectionType.FileTag, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+
+ App.QuickAccessManager.Model.DataChanged += Manager_DataChanged;
+ App.LibraryManager.DataChanged += Manager_DataChanged;
+ drivesViewModel.Drives.CollectionChanged += (x, args) => Manager_DataChanged(SectionType.Drives, args);
+ App.CloudDrivesManager.DataChanged += Manager_DataChanged;
+ networkDrivesViewModel.Drives.CollectionChanged += (x, args) => Manager_DataChanged(SectionType.Network, args);
+ App.WSLDistroManager.DataChanged += Manager_DataChanged;
+ App.FileTagsManager.DataChanged += Manager_DataChanged;
SidebarDisplayMode = UserSettingsService.AppearanceSettingsService.IsSidebarOpen ? SidebarDisplayMode.Expanded : SidebarDisplayMode.Compact;
HideSectionCommand = new RelayCommand(HideSection);
@@ -273,7 +273,7 @@ private Task CreateItemHomeAsync()
return CreateSectionAsync(SectionType.Home);
}
- private async void Manager_DataChangedAsync(object sender, NotifyCollectionChangedEventArgs e)
+ private async void Manager_DataChanged(object sender, NotifyCollectionChangedEventArgs e)
{
await dispatcherQueue.EnqueueOrInvokeAsync(async () =>
{
@@ -587,7 +587,7 @@ public async Task UpdateSectionVisibilityAsync(SectionType sectionType, bool sho
_ => () => Task.CompletedTask
};
- Manager_DataChangedAsync(sectionType, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ Manager_DataChanged(sectionType, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
await action();
}
@@ -642,13 +642,13 @@ public void Dispose()
{
UserSettingsService.OnSettingChangedEvent -= UserSettingsService_OnSettingChangedEvent;
- App.QuickAccessManager.Model.DataChanged -= Manager_DataChangedAsync;
- App.LibraryManager.DataChanged -= Manager_DataChangedAsync;
- drivesViewModel.Drives.CollectionChanged -= (x, args) => Manager_DataChangedAsync(SectionType.Drives, args);
- App.CloudDrivesManager.DataChanged -= Manager_DataChangedAsync;
- networkDrivesViewModel.Drives.CollectionChanged -= (x, args) => Manager_DataChangedAsync(SectionType.Network, args);
- App.WSLDistroManager.DataChanged -= Manager_DataChangedAsync;
- App.FileTagsManager.DataChanged -= Manager_DataChangedAsync;
+ App.QuickAccessManager.Model.DataChanged -= Manager_DataChanged;
+ App.LibraryManager.DataChanged -= Manager_DataChanged;
+ drivesViewModel.Drives.CollectionChanged -= (x, args) => Manager_DataChanged(SectionType.Drives, args);
+ App.CloudDrivesManager.DataChanged -= Manager_DataChanged;
+ networkDrivesViewModel.Drives.CollectionChanged -= (x, args) => Manager_DataChanged(SectionType.Network, args);
+ App.WSLDistroManager.DataChanged -= Manager_DataChanged;
+ App.FileTagsManager.DataChanged -= Manager_DataChanged;
}
public void UpdateTabControlMargin()
@@ -699,17 +699,17 @@ public async void HandleItemContextInvokedAsync(object sender, ItemContextInvoke
secondaryElements.ForEach(i => itemContextMenuFlyout.SecondaryCommands.Add(i));
if (item.MenuOptions.ShowShellItems)
- itemContextMenuFlyout.Opened += ItemContextMenuFlyout_OpenedAsync;
+ itemContextMenuFlyout.Opened += ItemContextMenuFlyout_Opened;
itemContextMenuFlyout.ShowAt(sidebarItem, new FlyoutShowOptions { Position = args.Position });
}
- private async void ItemContextMenuFlyout_OpenedAsync(object? sender, object e)
+ private async void ItemContextMenuFlyout_Opened(object? sender, object e)
{
if (sender is not CommandBarFlyout itemContextMenuFlyout)
return;
- itemContextMenuFlyout.Opened -= ItemContextMenuFlyout_OpenedAsync;
+ itemContextMenuFlyout.Opened -= ItemContextMenuFlyout_Opened;
await ShellContextmenuHelper.LoadShellMenuItemsAsync(rightClickedItem.Path, itemContextMenuFlyout, rightClickedItem.MenuOptions);
}
diff --git a/src/Files.App/ViewModels/UserControls/ToolbarViewModel.cs b/src/Files.App/ViewModels/UserControls/ToolbarViewModel.cs
index 53abf125280d..e8bb78024997 100644
--- a/src/Files.App/ViewModels/UserControls/ToolbarViewModel.cs
+++ b/src/Files.App/ViewModels/UserControls/ToolbarViewModel.cs
@@ -211,10 +211,10 @@ public ToolbarViewModel()
SearchBox.Escaped += SearchRegion_Escaped;
UserSettingsService.OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent;
- UpdateService.PropertyChanged += UpdateService_OnPropertyChangedAsync;
+ UpdateService.PropertyChanged += UpdateService_OnPropertyChanged;
}
- private async void UpdateService_OnPropertyChangedAsync(object? sender, PropertyChangedEventArgs e)
+ private async void UpdateService_OnPropertyChanged(object? sender, PropertyChangedEventArgs e)
{
IsUpdateAvailable = UpdateService.IsUpdateAvailable;
IsUpdating = UpdateService.IsUpdating;
@@ -297,7 +297,7 @@ public void PathBoxItem_DragLeave(object sender, DragEventArgs e)
private bool lockFlag = false;
- public async Task PathBoxItem_DropAsync(object sender, DragEventArgs e)
+ public async Task PathBoxItem_Drop(object sender, DragEventArgs e)
{
if (lockFlag)
return;
@@ -333,7 +333,7 @@ public async Task PathBoxItem_DropAsync(object sender, DragEventArgs e)
lockFlag = false;
}
- public async Task PathBoxItem_DragOverAsync(object sender, DragEventArgs e)
+ public async Task PathBoxItem_DragOver(object sender, DragEventArgs e)
{
if (IsSingleItemOverride ||
((StackPanel)sender).DataContext is not PathBoxItem pathBoxItem ||
@@ -494,7 +494,7 @@ public void PathBoxItem_PointerPressed(object sender, PointerRoutedEventArgs e)
pointerRoutedEventArgs = ptrPt.Properties.IsMiddleButtonPressed ? e : null;
}
- public async Task PathBoxItem_TappedAsync(object sender, TappedRoutedEventArgs e)
+ public async Task PathBoxItem_Tapped(object sender, TappedRoutedEventArgs e)
{
var itemTappedPath = ((sender as TextBlock)?.DataContext as PathBoxItem)?.Path;
if (itemTappedPath is null)
diff --git a/src/Files.App/Views/HomePage.xaml.cs b/src/Files.App/Views/HomePage.xaml.cs
index c5ca7f99baf9..5cdfd8aa8b48 100644
--- a/src/Files.App/Views/HomePage.xaml.cs
+++ b/src/Files.App/Views/HomePage.xaml.cs
@@ -69,10 +69,10 @@ public void ReloadWidgets()
quickAccessWidget.CardInvoked -= QuickAccessWidget_CardInvoked;
quickAccessWidget.CardNewPaneInvoked -= WidgetCardNewPaneInvoked;
- quickAccessWidget.CardPropertiesInvoked -= QuickAccessWidget_CardPropertiesInvokedAsync;
+ quickAccessWidget.CardPropertiesInvoked -= QuickAccessWidget_CardPropertiesInvoked;
quickAccessWidget.CardInvoked += QuickAccessWidget_CardInvoked;
quickAccessWidget.CardNewPaneInvoked += WidgetCardNewPaneInvoked;
- quickAccessWidget.CardPropertiesInvoked += QuickAccessWidget_CardPropertiesInvokedAsync;
+ quickAccessWidget.CardPropertiesInvoked += QuickAccessWidget_CardPropertiesInvoked;
}
// Reload DrivesWidget
@@ -108,9 +108,9 @@ public void ReloadWidgets()
recentFilesWidget.AppInstance = AppInstance;
recentFilesWidget.RecentFilesOpenLocationInvoked -= WidgetOpenLocationInvoked;
- recentFilesWidget.RecentFileInvoked -= RecentFilesWidget_RecentFileInvokedAsync;
+ recentFilesWidget.RecentFileInvoked -= RecentFilesWidget_RecentFileInvoked;
recentFilesWidget.RecentFilesOpenLocationInvoked += WidgetOpenLocationInvoked;
- recentFilesWidget.RecentFileInvoked += RecentFilesWidget_RecentFileInvokedAsync;
+ recentFilesWidget.RecentFileInvoked += RecentFilesWidget_RecentFileInvoked;
}
}
@@ -122,7 +122,7 @@ private void ViewModel_YourHomeLoadedInvoked(object? sender, Microsoft.UI.Xaml.R
ReloadWidgets();
}
- private async void RecentFilesWidget_RecentFileInvokedAsync(object sender, PathNavigationEventArgs e)
+ private async void RecentFilesWidget_RecentFileInvoked(object sender, PathNavigationEventArgs e)
{
try
{
@@ -173,7 +173,7 @@ private void WidgetCardNewPaneInvoked(object sender, QuickAccessCardInvokedEvent
AppInstance.PaneHolder?.OpenPathInNewPane(e.Path);
}
- private async void QuickAccessWidget_CardPropertiesInvokedAsync(object sender, QuickAccessCardEventArgs e)
+ private async void QuickAccessWidget_CardPropertiesInvoked(object sender, QuickAccessCardEventArgs e)
{
ListedItem listedItem = new(null!)
{
@@ -220,8 +220,8 @@ private async Task OnNavigatedToAsync(NavigationEventArgs eventArgs)
AppInstance.ToolbarViewModel.CanGoForward = AppInstance.CanNavigateForward;
AppInstance.ToolbarViewModel.CanNavigateToParent = false;
- AppInstance.ToolbarViewModel.RefreshRequested -= ToolbarViewModel_RefreshRequestedAsync;
- AppInstance.ToolbarViewModel.RefreshRequested += ToolbarViewModel_RefreshRequestedAsync;
+ AppInstance.ToolbarViewModel.RefreshRequested -= ToolbarViewModel_RefreshRequested;
+ AppInstance.ToolbarViewModel.RefreshRequested += ToolbarViewModel_RefreshRequested;
// Set path of working directory empty
await AppInstance.FilesystemViewModel.SetWorkingDirectoryAsync("Home");
@@ -246,10 +246,10 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
base.OnNavigatingFrom(e);
- AppInstance.ToolbarViewModel.RefreshRequested -= ToolbarViewModel_RefreshRequestedAsync;
+ AppInstance.ToolbarViewModel.RefreshRequested -= ToolbarViewModel_RefreshRequested;
}
- private async void ToolbarViewModel_RefreshRequestedAsync(object? sender, EventArgs e)
+ private async void ToolbarViewModel_RefreshRequested(object? sender, EventArgs e)
{
AppInstance.ToolbarViewModel.CanRefresh = false;
await Task.WhenAll(Widgets.ViewModel.Widgets.Select(w => w.WidgetItemModel.RefreshWidgetAsync()));
@@ -260,7 +260,7 @@ public void Dispose()
{
ViewModel.YourHomeLoadedInvoked -= ViewModel_YourHomeLoadedInvoked;
Widgets.ViewModel.WidgetListRefreshRequestedInvoked -= ViewModel_WidgetListRefreshRequestedInvoked;
- AppInstance.ToolbarViewModel.RefreshRequested -= ToolbarViewModel_RefreshRequestedAsync;
+ AppInstance.ToolbarViewModel.RefreshRequested -= ToolbarViewModel_RefreshRequested;
ViewModel?.Dispose();
}
}
diff --git a/src/Files.App/Views/LayoutModes/BaseLayout.cs b/src/Files.App/Views/LayoutModes/BaseLayout.cs
index 70ca3051c44f..ea3dd8e88b95 100644
--- a/src/Files.App/Views/LayoutModes/BaseLayout.cs
+++ b/src/Files.App/Views/LayoutModes/BaseLayout.cs
@@ -269,7 +269,7 @@ public BaseLayout()
jumpTimer.Interval = TimeSpan.FromSeconds(0.8);
jumpTimer.Tick += JumpTimer_Tick;
- Item_DragOverEventHandler = new DragEventHandler(Item_DragOverAsync);
+ Item_DragOverEventHandler = new DragEventHandler(Item_DragOver);
SelectedItemsPropertiesViewModel = new SelectedItemsPropertiesViewModel();
DirectoryPropertiesViewModel = new DirectoryPropertiesViewModel();
@@ -387,9 +387,9 @@ private async Task OnNavigatedToAsync(NavigationEventArgs eventArgs)
IsItemSelected = false;
FolderSettings!.LayoutModeChangeRequested += BaseFolderSettings_LayoutModeChangeRequested;
- FolderSettings.GroupOptionPreferenceUpdated += FolderSettings_GroupOptionPreferenceUpdatedAsync;
- FolderSettings.GroupDirectionPreferenceUpdated += FolderSettings_GroupDirectionPreferenceUpdatedAsync;
- FolderSettings.GroupByDateUnitPreferenceUpdated += FolderSettings_GroupByDateUnitPreferenceUpdatedAsync;
+ FolderSettings.GroupOptionPreferenceUpdated += FolderSettings_GroupOptionPreferenceUpdated;
+ FolderSettings.GroupDirectionPreferenceUpdated += FolderSettings_GroupDirectionPreferenceUpdated;
+ FolderSettings.GroupByDateUnitPreferenceUpdated += FolderSettings_GroupByDateUnitPreferenceUpdated;
ParentShellPageInstance.FilesystemViewModel.EmptyTextType = EmptyTextType.None;
ParentShellPageInstance.ToolbarViewModel.CanRefresh = true;
@@ -473,8 +473,8 @@ private async Task OnNavigatedToAsync(NavigationEventArgs eventArgs)
SetSelectedItemsOnNavigation();
- ItemContextMenuFlyout.Opening += ItemContextFlyout_OpeningAsync;
- BaseContextMenuFlyout.Opening += BaseContextFlyout_OpeningAsync;
+ ItemContextMenuFlyout.Opening += ItemContextFlyout_Opening;
+ BaseContextMenuFlyout.Opening += BaseContextFlyout_Opening;
// Git properties are not loaded by default
ParentShellPageInstance.FilesystemViewModel.EnabledGitProperties = GitProperties.None;
@@ -508,17 +508,17 @@ navigationArguments.SelectItems is not null &&
private CancellationTokenSource? groupingCancellationToken;
- private async void FolderSettings_GroupOptionPreferenceUpdatedAsync(object? sender, GroupOption e)
+ private async void FolderSettings_GroupOptionPreferenceUpdated(object? sender, GroupOption e)
{
await GroupPreferenceUpdatedAsync();
}
- private async void FolderSettings_GroupDirectionPreferenceUpdatedAsync(object? sender, SortDirection e)
+ private async void FolderSettings_GroupDirectionPreferenceUpdated(object? sender, SortDirection e)
{
await GroupPreferenceUpdatedAsync();
}
- private async void FolderSettings_GroupByDateUnitPreferenceUpdatedAsync(object? sender, GroupByDateUnit e)
+ private async void FolderSettings_GroupByDateUnitPreferenceUpdated(object? sender, GroupByDateUnit e)
{
await GroupPreferenceUpdatedAsync();
}
@@ -544,11 +544,11 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
// Remove item jumping handler
CharacterReceived -= Page_CharacterReceived;
FolderSettings!.LayoutModeChangeRequested -= BaseFolderSettings_LayoutModeChangeRequested;
- FolderSettings.GroupOptionPreferenceUpdated -= FolderSettings_GroupOptionPreferenceUpdatedAsync;
- FolderSettings.GroupDirectionPreferenceUpdated -= FolderSettings_GroupDirectionPreferenceUpdatedAsync;
- FolderSettings.GroupByDateUnitPreferenceUpdated -= FolderSettings_GroupByDateUnitPreferenceUpdatedAsync;
- ItemContextMenuFlyout.Opening -= ItemContextFlyout_OpeningAsync;
- BaseContextMenuFlyout.Opening -= BaseContextFlyout_OpeningAsync;
+ FolderSettings.GroupOptionPreferenceUpdated -= FolderSettings_GroupOptionPreferenceUpdated;
+ FolderSettings.GroupDirectionPreferenceUpdated -= FolderSettings_GroupDirectionPreferenceUpdated;
+ FolderSettings.GroupByDateUnitPreferenceUpdated -= FolderSettings_GroupByDateUnitPreferenceUpdated;
+ ItemContextMenuFlyout.Opening -= ItemContextFlyout_Opening;
+ BaseContextMenuFlyout.Opening -= BaseContextFlyout_Opening;
var parameter = e.Parameter as NavigationArguments;
if (parameter is not null && !parameter.IsLayoutSwitch)
@@ -558,7 +558,7 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
private CancellationTokenSource? shellContextMenuItemCancellationToken;
private bool shiftPressed;
- private async void ItemContextFlyout_OpeningAsync(object? sender, object e)
+ private async void ItemContextFlyout_Opening(object? sender, object e)
{
App.LastOpenedFlyout = sender as CommandBarFlyout;
@@ -621,7 +621,7 @@ private async void ItemContextFlyout_OpeningAsync(object? sender, object e)
}
}
- private async void BaseContextFlyout_OpeningAsync(object? sender, object e)
+ private async void BaseContextFlyout_Opening(object? sender, object e)
{
App.LastOpenedFlyout = sender as CommandBarFlyout;
@@ -1000,7 +1000,7 @@ private void Item_DragLeave(object sender, DragEventArgs e)
dragOverItem = null;
}
- private async void Item_DragOverAsync(object sender, DragEventArgs e)
+ private async void Item_DragOver(object sender, DragEventArgs e)
{
var item = GetItemFromElement(sender);
if (item is null)
@@ -1097,7 +1097,7 @@ private async void Item_DragOverAsync(object sender, DragEventArgs e)
}
}
- private async void Item_DropAsync(object sender, DragEventArgs e)
+ private async void Item_Drop(object sender, DragEventArgs e)
{
var deferral = e.GetDeferral();
@@ -1259,7 +1259,7 @@ protected void InitializeDrag(UIElement container, ListedItem item)
container.AllowDrop = true;
container.AddHandler(UIElement.DragOverEvent, Item_DragOverEventHandler, true);
container.DragLeave += Item_DragLeave;
- container.Drop += Item_DropAsync;
+ container.Drop += Item_Drop;
}
}
@@ -1268,7 +1268,7 @@ protected void UninitializeDrag(UIElement element)
element.AllowDrop = false;
element.RemoveHandler(UIElement.DragOverEvent, Item_DragOverEventHandler);
element.DragLeave -= Item_DragLeave;
- element.Drop -= Item_DropAsync;
+ element.Drop -= Item_Drop;
}
// VirtualKey doesn't support or accept plus and minus by default.
diff --git a/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml b/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml
index 4848d6b4ee1c..d53c8f3b7de9 100644
--- a/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml
+++ b/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml
@@ -170,12 +170,12 @@
IsRightTapEnabled="True"
IsTabStop="True"
ItemsSource="{x:Bind CollectionViewSource.View, Mode=OneWay}"
- PreviewKeyDown="FileList_PreviewKeyDownAsync"
+ PreviewKeyDown="FileList_PreviewKeyDown"
RightTapped="FileList_RightTapped"
ScrollViewer.IsScrollInertiaEnabled="True"
SelectionChanged="FileList_SelectionChanged"
SelectionMode="Extended"
- Tapped="FileList_ItemTappedAsync">
+ Tapped="FileList_ItemTapped">
@@ -288,7 +288,7 @@
Margin="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
- BeforeTextChanging="ItemNameTextBox_BeforeTextChangingAsync"
+ BeforeTextChanging="ItemNameTextBox_BeforeTextChanging"
TextAlignment="Left"
TextWrapping="Wrap"
Visibility="Collapsed" />
diff --git a/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs b/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs
index e427b1f362b1..277c7bdac103 100644
--- a/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs
+++ b/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs
@@ -151,7 +151,7 @@ override public void StartRenameItem()
StartRenameItem("ListViewTextBoxItemName");
}
- private async void ItemNameTextBox_BeforeTextChangingAsync(TextBox textBox, TextBoxBeforeTextChangingEventArgs args)
+ private async void ItemNameTextBox_BeforeTextChanging(TextBox textBox, TextBoxBeforeTextChangingEventArgs args)
{
if (IsRenamingItem)
{
@@ -176,8 +176,8 @@ protected override void EndRename(TextBox textBox)
textBlock!.Visibility = Visibility.Visible;
}
- textBox!.LostFocus -= RenameTextBox_LostFocusAsync;
- textBox.KeyDown -= RenameTextBox_KeyDownAsync;
+ textBox!.LostFocus -= RenameTextBox_LostFocus;
+ textBox.KeyDown -= RenameTextBox_KeyDown;
FileNameTeachingTip.IsOpen = false;
IsRenamingItem = false;
}
@@ -240,7 +240,7 @@ private void FileList_RightTapped(object sender, RightTappedRoutedEventArgs e)
HandleRightClick();
}
- protected override async void FileList_PreviewKeyDownAsync(object sender, KeyRoutedEventArgs e)
+ protected override async void FileList_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
{
if
(
@@ -367,7 +367,7 @@ private void HandleRightClick()
element.Focus(FocusState.Programmatic);
}
- private async void FileList_ItemTappedAsync(object sender, TappedRoutedEventArgs e)
+ private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)
{
var ctrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
var shiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down);
diff --git a/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml b/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml
index 360534df522d..51d7389d2185 100644
--- a/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml
+++ b/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml
@@ -221,12 +221,12 @@
ItemsSource="{x:Bind CollectionViewSource.View, Mode=OneWay}"
Loaded="FileList_Loaded"
LosingFocus="FileList_LosingFocus"
- PreviewKeyDown="FileList_PreviewKeyDownAsync"
+ PreviewKeyDown="FileList_PreviewKeyDown"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollMode="Auto"
SelectionChanged="FileList_SelectionChanged"
SelectionMode="Extended"
- Tapped="FileList_ItemTappedAsync"
+ Tapped="FileList_ItemTapped"
Visibility="{x:Bind FolderSettings.IsLayoutModeChanging, Converter={StaticResource NegatedBoolToVisibilityConverter}, Mode=OneWay}">
diff --git a/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs b/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs
index 42495e3457a0..e3a21a0c7523 100644
--- a/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs
+++ b/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs
@@ -311,8 +311,8 @@ protected override void EndRename(TextBox textBox)
textBlock!.Visibility = Visibility.Visible;
}
- textBox!.LostFocus -= RenameTextBox_LostFocusAsync;
- textBox.KeyDown -= RenameTextBox_KeyDownAsync;
+ textBox!.LostFocus -= RenameTextBox_LostFocus;
+ textBox.KeyDown -= RenameTextBox_KeyDown;
FileNameTeachingTip.IsOpen = false;
IsRenamingItem = false;
@@ -320,7 +320,7 @@ protected override void EndRename(TextBox textBox)
listViewItem?.Focus(FocusState.Programmatic);
}
- protected override async void FileList_PreviewKeyDownAsync(object sender, KeyRoutedEventArgs e)
+ protected override async void FileList_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
{
if (ParentShellPageInstance is null || IsRenamingItem)
return;
@@ -421,7 +421,7 @@ private async Task ReloadItemIconsAsync()
}
}
- private async void FileList_ItemTappedAsync(object sender, TappedRoutedEventArgs e)
+ private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)
{
var clickedItem = e.OriginalSource as FrameworkElement;
var ctrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
diff --git a/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml b/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml
index ce2ea2b366c4..71c6778a9cf0 100644
--- a/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml
+++ b/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml
@@ -584,13 +584,13 @@
IsDoubleTapEnabled="True"
IsTabStop="True"
ItemsSource="{x:Bind CollectionViewSource.View, Mode=OneWay}"
- PreviewKeyDown="FileList_PreviewKeyDownAsync"
+ PreviewKeyDown="FileList_PreviewKeyDown"
ScrollViewer.IsHorizontalScrollChainingEnabled="False"
SelectionChanged="FileList_SelectionChanged"
SelectionMode="Extended"
ShowsScrollingPlaceholders="True"
StretchContentForSingleRow="False"
- Tapped="FileList_ItemTappedAsync">
+ Tapped="FileList_ItemTapped">
diff --git a/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs b/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs
index f432c2ea3465..b13e998d6486 100644
--- a/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs
+++ b/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs
@@ -205,8 +205,8 @@ override public void StartRenameItem()
}
textBox.Focus(FocusState.Pointer);
- textBox.LostFocus += RenameTextBox_LostFocusAsync;
- textBox.KeyDown += RenameTextBox_KeyDownAsync;
+ textBox.LostFocus += RenameTextBox_LostFocus;
+ textBox.KeyDown += RenameTextBox_KeyDown;
int selectedTextLength = SelectedItem.Name.Length;
if (!SelectedItem.IsShortcut && UserSettingsService.FoldersSettingsService.ShowFileExtensions)
@@ -250,8 +250,8 @@ protected override void EndRename(TextBox textBox)
textBlock!.Visibility = Visibility.Visible;
}
- textBox!.LostFocus -= RenameTextBox_LostFocusAsync;
- textBox.KeyDown -= RenameTextBox_KeyDownAsync;
+ textBox!.LostFocus -= RenameTextBox_LostFocus;
+ textBox.KeyDown -= RenameTextBox_KeyDown;
FileNameTeachingTip.IsOpen = false;
IsRenamingItem = false;
@@ -259,7 +259,7 @@ protected override void EndRename(TextBox textBox)
gridViewItem?.Focus(FocusState.Programmatic);
}
- protected override async void FileList_PreviewKeyDownAsync(object sender, KeyRoutedEventArgs e)
+ protected override async void FileList_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
{
if (ParentShellPageInstance is null || IsRenamingItem)
return;
@@ -359,7 +359,7 @@ private async Task ReloadItemIconsAsync()
}
}
- private async void FileList_ItemTappedAsync(object sender, TappedRoutedEventArgs e)
+ private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)
{
var clickedItem = e.OriginalSource as FrameworkElement;
var ctrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
diff --git a/src/Files.App/Views/LayoutModes/StandardLayoutMode.cs b/src/Files.App/Views/LayoutModes/StandardLayoutMode.cs
index 53ffe9ce80b5..35557fd9604d 100644
--- a/src/Files.App/Views/LayoutModes/StandardLayoutMode.cs
+++ b/src/Files.App/Views/LayoutModes/StandardLayoutMode.cs
@@ -162,7 +162,7 @@ protected virtual void FileList_SelectionChanged(object sender, SelectionChanged
SelectedItems = ListViewBase.SelectedItems.Cast().Where(x => x is not null).ToList();
}
- protected abstract void FileList_PreviewKeyDownAsync(object sender, KeyRoutedEventArgs e);
+ protected abstract void FileList_PreviewKeyDown(object sender, KeyRoutedEventArgs e);
protected virtual void SelectionRectangle_SelectionEnded(object? sender, EventArgs e)
{
@@ -199,8 +199,8 @@ protected virtual void StartRenameItem(string itemNameTextBox)
Grid.SetColumnSpan(textBox.FindParent(), 8);
textBox.Focus(FocusState.Pointer);
- textBox.LostFocus += RenameTextBox_LostFocusAsync;
- textBox.KeyDown += RenameTextBox_KeyDownAsync;
+ textBox.LostFocus += RenameTextBox_LostFocus;
+ textBox.KeyDown += RenameTextBox_KeyDown;
int selectedTextLength = SelectedItem.Name.Length;
@@ -221,7 +221,7 @@ protected virtual async Task CommitRenameAsync(TextBox textBox)
await UIFilesystemHelpers.RenameFileItemAsync(RenamingItem, newItemName, ParentShellPageInstance);
}
- protected virtual async void RenameTextBox_LostFocusAsync(object sender, RoutedEventArgs e)
+ protected virtual async void RenameTextBox_LostFocus(object sender, RoutedEventArgs e)
{
// This check allows the user to use the text box context menu without ending the rename
if (!(FocusManager.GetFocusedElement(XamlRoot) is AppBarButton or Popup))
@@ -231,19 +231,19 @@ protected virtual async void RenameTextBox_LostFocusAsync(object sender, RoutedE
}
}
- protected async void RenameTextBox_KeyDownAsync(object sender, KeyRoutedEventArgs e)
+ protected async void RenameTextBox_KeyDown(object sender, KeyRoutedEventArgs e)
{
var textBox = (TextBox)sender;
switch (e.Key)
{
case VirtualKey.Escape:
- textBox.LostFocus -= RenameTextBox_LostFocusAsync;
+ textBox.LostFocus -= RenameTextBox_LostFocus;
textBox.Text = OldItemName;
EndRename(textBox);
e.Handled = true;
break;
case VirtualKey.Enter:
- textBox.LostFocus -= RenameTextBox_LostFocusAsync;
+ textBox.LostFocus -= RenameTextBox_LostFocus;
await CommitRenameAsync(textBox);
e.Handled = true;
break;
@@ -262,7 +262,7 @@ protected async void RenameTextBox_KeyDownAsync(object sender, KeyRoutedEventArg
e.Handled = (textBox.SelectionStart + textBox.SelectionLength) == textBox.Text.Length;
break;
case VirtualKey.Tab:
- textBox.LostFocus -= RenameTextBox_LostFocusAsync;
+ textBox.LostFocus -= RenameTextBox_LostFocus;
var isShiftPressed = (GetKeyState((int)VirtualKey.Shift) & KEY_DOWN_MASK) != 0;
NextRenameIndex = isShiftPressed ? -1 : 1;
diff --git a/src/Files.App/Views/PaneHolderPage.xaml.cs b/src/Files.App/Views/PaneHolderPage.xaml.cs
index 220a1364f8cb..197e15120938 100644
--- a/src/Files.App/Views/PaneHolderPage.xaml.cs
+++ b/src/Files.App/Views/PaneHolderPage.xaml.cs
@@ -323,11 +323,11 @@ public void CloseActivePane()
private void Pane_Loaded(object sender, RoutedEventArgs e)
{
- ((UIElement)sender).GotFocus += Pane_GotFocusAsync;
+ ((UIElement)sender).GotFocus += Pane_GotFocus;
((UIElement)sender).RightTapped += Pane_RightTapped;
}
- private async void Pane_GotFocusAsync(object sender, RoutedEventArgs e)
+ private async void Pane_GotFocus(object sender, RoutedEventArgs e)
{
var isLeftPane = sender == PaneLeft;
if (isLeftPane && (PaneRight?.SlimContentPage?.IsItemSelected ?? false))
diff --git a/src/Files.App/Views/Properties/CompatibilityPage.xaml b/src/Files.App/Views/Properties/CompatibilityPage.xaml
index a5623bf176b3..510e8f56ac19 100644
--- a/src/Files.App/Views/Properties/CompatibilityPage.xaml
+++ b/src/Files.App/Views/Properties/CompatibilityPage.xaml
@@ -9,7 +9,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:settingsuc="using:Files.App.UserControls.Settings"
xmlns:vm="using:Files.App.ViewModels.Properties"
- Loaded="Properties_LoadedAsync"
+ Loaded="Properties_Loaded"
Tag="Compatibility"
mc:Ignorable="d">
diff --git a/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs b/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs
index 03739e85c12c..ea8fc16497a7 100644
--- a/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs
+++ b/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs
@@ -28,9 +28,9 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
base.OnNavigatedTo(e);
}
- protected override void Properties_LoadedAsync(object sender, RoutedEventArgs e)
+ protected override void Properties_Loaded(object sender, RoutedEventArgs e)
{
- base.Properties_LoadedAsync(sender, e);
+ base.Properties_Loaded(sender, e);
CompatibilityProperties?.GetCompatibilityOptions();
}
diff --git a/src/Files.App/Views/Properties/DetailsPage.xaml b/src/Files.App/Views/Properties/DetailsPage.xaml
index 177296cd00bd..224116e49ca2 100644
--- a/src/Files.App/Views/Properties/DetailsPage.xaml
+++ b/src/Files.App/Views/Properties/DetailsPage.xaml
@@ -8,7 +8,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitconverters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:vm="using:Files.App.ViewModels.Properties"
- Loaded="Properties_LoadedAsync"
+ Loaded="Properties_Loaded"
Tag="Details"
mc:Ignorable="d">
@@ -139,7 +139,7 @@
diff --git a/src/Files.App/Views/Properties/DetailsPage.xaml.cs b/src/Files.App/Views/Properties/DetailsPage.xaml.cs
index b5552d7fedaf..638bda3034b6 100644
--- a/src/Files.App/Views/Properties/DetailsPage.xaml.cs
+++ b/src/Files.App/Views/Properties/DetailsPage.xaml.cs
@@ -22,9 +22,9 @@ public DetailsPage()
_updateDateDisplayTimer.Start();
}
- protected override async void Properties_LoadedAsync(object sender, RoutedEventArgs e)
+ protected override async void Properties_Loaded(object sender, RoutedEventArgs e)
{
- base.Properties_LoadedAsync(sender, e);
+ base.Properties_Loaded(sender, e);
if (BaseProperties is IFileProperties fileProps)
{
@@ -68,7 +68,7 @@ public override async Task SaveChangesAsync()
}
}
- private async void ClearPropertiesConfirmation_ClickAsync(object sender, RoutedEventArgs e)
+ private async void ClearPropertiesConfirmation_Click(object sender, RoutedEventArgs e)
{
ClearPropertiesFlyout.Hide();
if (BaseProperties is IFileProperties fileProps)
diff --git a/src/Files.App/Views/Properties/GeneralPage.xaml b/src/Files.App/Views/Properties/GeneralPage.xaml
index df84f5e9d939..b3494c3d4fab 100644
--- a/src/Files.App/Views/Properties/GeneralPage.xaml
+++ b/src/Files.App/Views/Properties/GeneralPage.xaml
@@ -10,7 +10,7 @@
xmlns:toolkitconverters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:uc="using:Files.App.UserControls"
xmlns:vm="using:Files.App.ViewModels.Properties"
- Loaded="Properties_LoadedAsync"
+ Loaded="Properties_Loaded"
Tag="General"
mc:Ignorable="d">
diff --git a/src/Files.App/Views/Properties/LibraryPage.xaml b/src/Files.App/Views/Properties/LibraryPage.xaml
index 8d2ebdb4a5fe..e6e3d913a878 100644
--- a/src/Files.App/Views/Properties/LibraryPage.xaml
+++ b/src/Files.App/Views/Properties/LibraryPage.xaml
@@ -9,7 +9,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitconverters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:vm="using:Files.App.ViewModels.Properties"
- Loaded="Properties_LoadedAsync"
+ Loaded="Properties_Loaded"
Tag="Library"
mc:Ignorable="d">
diff --git a/src/Files.App/Views/Properties/LibraryPage.xaml.cs b/src/Files.App/Views/Properties/LibraryPage.xaml.cs
index d922d140cfec..717f46c2bcd8 100644
--- a/src/Files.App/Views/Properties/LibraryPage.xaml.cs
+++ b/src/Files.App/Views/Properties/LibraryPage.xaml.cs
@@ -76,9 +76,9 @@ public LibraryPage()
RemoveLocationCommand = new RelayCommand(RemoveLocation);
}
- protected override void Properties_LoadedAsync(object sender, RoutedEventArgs e)
+ protected override void Properties_Loaded(object sender, RoutedEventArgs e)
{
- base.Properties_LoadedAsync(sender, e);
+ base.Properties_Loaded(sender, e);
if (BaseProperties is LibraryProperties props)
{
diff --git a/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs b/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs
index 5cd8af989c13..b8f2233ea386 100644
--- a/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs
+++ b/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs
@@ -46,7 +46,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
private void Page_Loaded(object sender, RoutedEventArgs e)
{
AppSettings = Ioc.Default.GetRequiredService();
- AppSettings.ThemeModeChanged += AppSettings_ThemeModeChangedAsync;
+ AppSettings.ThemeModeChanged += AppSettings_ThemeModeChanged;
Window.Closed += Window_Closed;
UpdatePageLayout();
@@ -79,7 +79,7 @@ private void UpdatePageLayout()
foreach (var item in MainPropertiesViewModel.NavigationViewItems) item.IsCompact = false;
}
- private async void AppSettings_ThemeModeChangedAsync(object? sender, EventArgs e)
+ private async void AppSettings_ThemeModeChanged(object? sender, EventArgs e)
{
if (Parent is null)
return;
@@ -108,7 +108,7 @@ await DispatcherQueue.EnqueueOrInvokeAsync(() =>
private void Window_Closed(object sender, WindowEventArgs args)
{
- AppSettings.ThemeModeChanged -= AppSettings_ThemeModeChangedAsync;
+ AppSettings.ThemeModeChanged -= AppSettings_ThemeModeChanged;
Window.Closed -= Window_Closed;
if (MainPropertiesViewModel.ChangedPropertiesCancellationTokenSource is not null &&
diff --git a/src/Files.App/Views/Properties/ShortcutPage.xaml b/src/Files.App/Views/Properties/ShortcutPage.xaml
index 6c35d89469cd..fec24b454e93 100644
--- a/src/Files.App/Views/Properties/ShortcutPage.xaml
+++ b/src/Files.App/Views/Properties/ShortcutPage.xaml
@@ -8,7 +8,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:settingsuc="using:Files.App.UserControls.Settings"
xmlns:vm="using:Files.App.ViewModels.Properties"
- Loaded="Properties_LoadedAsync"
+ Loaded="Properties_Loaded"
Tag="Shortcut"
mc:Ignorable="d">
diff --git a/src/Files.App/Views/Settings/AboutPage.xaml b/src/Files.App/Views/Settings/AboutPage.xaml
index 78493605a50b..8cfba9e7a5e7 100644
--- a/src/Files.App/Views/Settings/AboutPage.xaml
+++ b/src/Files.App/Views/Settings/AboutPage.xaml
@@ -177,7 +177,7 @@
diff --git a/src/Files.App/Views/Settings/AboutPage.xaml.cs b/src/Files.App/Views/Settings/AboutPage.xaml.cs
index c56808c42e2f..b7df29912517 100644
--- a/src/Files.App/Views/Settings/AboutPage.xaml.cs
+++ b/src/Files.App/Views/Settings/AboutPage.xaml.cs
@@ -20,7 +20,7 @@ private void ThirdPartyLicenses_Click(object sender, bool e)
ViewModel.LoadThirdPartyNoticesAsync();
}
- private async void MarkdownTextBlock_LinkClickedAsync(object sender, LinkClickedEventArgs e)
+ private async void MarkdownTextBlock_LinkClicked(object sender, LinkClickedEventArgs e)
{
if (Uri.TryCreate(e.Link, UriKind.Absolute, out Uri? link))
await Launcher.LaunchUriAsync(link);
diff --git a/src/Files.App/Views/Shells/BaseShellPage.cs b/src/Files.App/Views/Shells/BaseShellPage.cs
index 9d824fa24a0e..fbc7253e1a85 100644
--- a/src/Files.App/Views/Shells/BaseShellPage.cs
+++ b/src/Files.App/Views/Shells/BaseShellPage.cs
@@ -82,14 +82,14 @@ public BaseLayout ContentPage
if (value != _ContentPage)
{
if (_ContentPage is not null)
- _ContentPage.DirectoryPropertiesViewModel.CheckoutRequested -= GitCheckout_RequiredAsync;
+ _ContentPage.DirectoryPropertiesViewModel.CheckoutRequested -= GitCheckout_Required;
_ContentPage = value;
NotifyPropertyChanged(nameof(ContentPage));
NotifyPropertyChanged(nameof(SlimContentPage));
if (value is not null)
- _ContentPage.DirectoryPropertiesViewModel.CheckoutRequested += GitCheckout_RequiredAsync;
+ _ContentPage.DirectoryPropertiesViewModel.CheckoutRequested += GitCheckout_Required;
}
}
}
@@ -187,17 +187,17 @@ public BaseShellPage(CurrentInstanceViewModel instanceViewModel)
FlowDirection = FlowDirection.RightToLeft;
ToolbarViewModel.ToolbarPathItemInvoked += ShellPage_NavigationRequested;
- ToolbarViewModel.ToolbarFlyoutOpened += ShellPage_ToolbarFlyoutOpenedAsync;
- ToolbarViewModel.ToolbarPathItemLoaded += ShellPage_ToolbarPathItemLoadedAsync;
+ ToolbarViewModel.ToolbarFlyoutOpened += ShellPage_ToolbarFlyoutOpened;
+ ToolbarViewModel.ToolbarPathItemLoaded += ShellPage_ToolbarPathItemLoaded;
ToolbarViewModel.AddressBarTextEntered += ShellPage_AddressBarTextEntered;
- ToolbarViewModel.PathBoxItemDropped += ShellPage_PathBoxItemDroppedAsync;
+ ToolbarViewModel.PathBoxItemDropped += ShellPage_PathBoxItemDropped;
ToolbarViewModel.RefreshRequested += ShellPage_RefreshRequested;
ToolbarViewModel.EditModeEnabled += NavigationToolbar_EditModeEnabled;
ToolbarViewModel.ItemDraggedOverPathItem += ShellPage_NavigationRequested;
- ToolbarViewModel.PathBoxQuerySubmitted += NavigationToolbar_QuerySubmittedAsync;
- ToolbarViewModel.SearchBox.TextChanged += ShellPage_TextChangedAsync;
- ToolbarViewModel.SearchBox.QuerySubmitted += ShellPage_QuerySubmittedAsync;
+ ToolbarViewModel.PathBoxQuerySubmitted += NavigationToolbar_QuerySubmitted;
+ ToolbarViewModel.SearchBox.TextChanged += ShellPage_TextChanged;
+ ToolbarViewModel.SearchBox.QuerySubmitted += ShellPage_QuerySubmitted;
InstanceViewModel.FolderSettings.SortDirectionPreferenceUpdated += AppSettings_SortDirectionPreferenceUpdated;
InstanceViewModel.FolderSettings.SortOptionPreferenceUpdated += AppSettings_SortOptionPreferenceUpdated;
@@ -235,7 +235,7 @@ protected void FilesystemViewModel_OnSelectionRequestedEvent(object sender, List
ContentPage.ItemManipulationModel.SetSelectedItems(e);
}
- protected async void FilesystemViewModel_DirectoryInfoUpdatedAsync(object sender, EventArgs e)
+ protected async void FilesystemViewModel_DirectoryInfoUpdated(object sender, EventArgs e)
{
if (ContentPage is null)
return;
@@ -285,7 +285,7 @@ protected void FilesystemViewModel_GitDirectoryUpdated(object sender, EventArgs
GitHelpers.GetBranchesNames(InstanceViewModel.GitRepositoryPath));
}
- protected async void GitCheckout_RequiredAsync(object? sender, string branchName)
+ protected async void GitCheckout_Required(object? sender, string branchName)
{
if (!await GitHelpers.Checkout(FilesystemViewModel.GitDirectory, branchName))
{
@@ -333,7 +333,7 @@ protected void ShellPage_PreviewKeyDown(object sender, KeyRoutedEventArgs args)
}
}
- protected async void ShellPage_QuerySubmittedAsync(ISearchBox sender, SearchBoxQuerySubmittedEventArgs e)
+ protected async void ShellPage_QuerySubmitted(ISearchBox sender, SearchBoxQuerySubmittedEventArgs e)
{
if (e.ChosenSuggestion is SuggestionModel item && !string.IsNullOrWhiteSpace(item.ItemPath))
await NavigationHelpers.OpenPath(item.ItemPath, this);
@@ -341,7 +341,7 @@ protected async void ShellPage_QuerySubmittedAsync(ISearchBox sender, SearchBoxQ
SubmitSearch(sender.Query, userSettingsService.GeneralSettingsService.SearchUnindexedItems);
}
- protected async void ShellPage_TextChangedAsync(ISearchBox sender, SearchBoxTextChangedEventArgs e)
+ protected async void ShellPage_TextChanged(ISearchBox sender, SearchBoxTextChangedEventArgs e)
{
if (e.Reason != SearchBoxTextChangeReason.UserInput)
return;
@@ -395,7 +395,7 @@ protected void CoreWindow_PointerPressed(object sender, PointerRoutedEventArgs a
Forward_Click();
}
- protected async void ShellPage_PathBoxItemDroppedAsync(object sender, PathBoxItemDroppedEventArgs e)
+ protected async void ShellPage_PathBoxItemDropped(object sender, PathBoxItemDroppedEventArgs e)
{
await FilesystemHelpers.PerformOperationTypeAsync(e.AcceptedOperation, e.Package, e.Path, false, true);
e.SignalEvent?.Set();
@@ -406,17 +406,17 @@ protected void ShellPage_AddressBarTextEntered(object sender, AddressBarTextEnte
ToolbarViewModel.SetAddressBarSuggestionsAsync(e.AddressBarTextField, this);
}
- protected async void ShellPage_ToolbarPathItemLoadedAsync(object sender, ToolbarPathItemLoadedEventArgs e)
+ protected async void ShellPage_ToolbarPathItemLoaded(object sender, ToolbarPathItemLoadedEventArgs e)
{
await ToolbarViewModel.SetPathBoxDropDownFlyoutAsync(e.OpenedFlyout, e.Item, this);
}
- protected async void ShellPage_ToolbarFlyoutOpenedAsync(object sender, ToolbarFlyoutOpenedEventArgs e)
+ protected async void ShellPage_ToolbarFlyoutOpened(object sender, ToolbarFlyoutOpenedEventArgs e)
{
await ToolbarViewModel.SetPathBoxDropDownFlyoutAsync(e.OpenedFlyout, (e.OpenedFlyout.Target as FontIcon).DataContext as PathBoxItem, this);
}
- protected async void NavigationToolbar_QuerySubmittedAsync(object sender, ToolbarQuerySubmittedEventArgs e)
+ protected async void NavigationToolbar_QuerySubmitted(object sender, ToolbarQuerySubmittedEventArgs e)
{
await ToolbarViewModel.CheckPathInputAsync(e.QueryText, ToolbarViewModel.PathComponents.LastOrDefault()?.Path, this);
}
@@ -766,15 +766,15 @@ public virtual void Dispose()
drivesViewModel.PropertyChanged -= DrivesManager_PropertyChanged;
ToolbarViewModel.ToolbarPathItemInvoked -= ShellPage_NavigationRequested;
- ToolbarViewModel.ToolbarFlyoutOpened -= ShellPage_ToolbarFlyoutOpenedAsync;
- ToolbarViewModel.ToolbarPathItemLoaded -= ShellPage_ToolbarPathItemLoadedAsync;
+ ToolbarViewModel.ToolbarFlyoutOpened -= ShellPage_ToolbarFlyoutOpened;
+ ToolbarViewModel.ToolbarPathItemLoaded -= ShellPage_ToolbarPathItemLoaded;
ToolbarViewModel.AddressBarTextEntered -= ShellPage_AddressBarTextEntered;
- ToolbarViewModel.PathBoxItemDropped -= ShellPage_PathBoxItemDroppedAsync;
+ ToolbarViewModel.PathBoxItemDropped -= ShellPage_PathBoxItemDropped;
ToolbarViewModel.RefreshRequested -= ShellPage_RefreshRequested;
ToolbarViewModel.EditModeEnabled -= NavigationToolbar_EditModeEnabled;
ToolbarViewModel.ItemDraggedOverPathItem -= ShellPage_NavigationRequested;
- ToolbarViewModel.PathBoxQuerySubmitted -= NavigationToolbar_QuerySubmittedAsync;
- ToolbarViewModel.SearchBox.TextChanged -= ShellPage_TextChangedAsync;
+ ToolbarViewModel.PathBoxQuerySubmitted -= NavigationToolbar_QuerySubmitted;
+ ToolbarViewModel.SearchBox.TextChanged -= ShellPage_TextChanged;
InstanceViewModel.FolderSettings.LayoutPreferencesUpdateRequired -= FolderSettings_LayoutPreferencesUpdateRequired;
InstanceViewModel.FolderSettings.SortDirectionPreferenceUpdated -= AppSettings_SortDirectionPreferenceUpdated;
@@ -786,7 +786,7 @@ public virtual void Dispose()
{
FilesystemViewModel.WorkingDirectoryModified -= ViewModel_WorkingDirectoryModified;
FilesystemViewModel.ItemLoadStatusChanged -= FilesystemViewModel_ItemLoadStatusChanged;
- FilesystemViewModel.DirectoryInfoUpdated -= FilesystemViewModel_DirectoryInfoUpdatedAsync;
+ FilesystemViewModel.DirectoryInfoUpdated -= FilesystemViewModel_DirectoryInfoUpdated;
FilesystemViewModel.PageTypeUpdated -= FilesystemViewModel_PageTypeUpdated;
FilesystemViewModel.OnSelectionRequestedEvent -= FilesystemViewModel_OnSelectionRequestedEvent;
FilesystemViewModel.GitDirectoryUpdated -= FilesystemViewModel_GitDirectoryUpdated;
diff --git a/src/Files.App/Views/Shells/ColumnShellPage.xaml b/src/Files.App/Views/Shells/ColumnShellPage.xaml
index 167b98e18e58..6d1768885433 100644
--- a/src/Files.App/Views/Shells/ColumnShellPage.xaml
+++ b/src/Files.App/Views/Shells/ColumnShellPage.xaml
@@ -22,7 +22,7 @@
@@ -58,7 +58,7 @@
HorizontalAlignment="Stretch"
x:FieldModifier="public"
Canvas.ZIndex="30"
- Navigated="ItemDisplayFrame_NavigatedAsync" />
+ Navigated="ItemDisplayFrame_Navigated" />
diff --git a/src/Files.App/Views/Shells/ColumnShellPage.xaml.cs b/src/Files.App/Views/Shells/ColumnShellPage.xaml.cs
index e34699352fc0..b886cd1602d7 100644
--- a/src/Files.App/Views/Shells/ColumnShellPage.xaml.cs
+++ b/src/Files.App/Views/Shells/ColumnShellPage.xaml.cs
@@ -52,7 +52,7 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
ColumnParams = eventArgs.Parameter as ColumnParam;
if (ColumnParams?.IsLayoutSwitch ?? false)
- FilesystemViewModel_DirectoryInfoUpdatedAsync(this, EventArgs.Empty);
+ FilesystemViewModel_DirectoryInfoUpdated(this, EventArgs.Empty);
}
protected override void ShellPage_NavigationRequested(object sender, PathNavigationEventArgs e)
@@ -79,7 +79,7 @@ protected override void Page_Loaded(object sender, RoutedEventArgs e)
FilesystemViewModel = new ItemViewModel(InstanceViewModel?.FolderSettings);
FilesystemViewModel.WorkingDirectoryModified += ViewModel_WorkingDirectoryModified;
FilesystemViewModel.ItemLoadStatusChanged += FilesystemViewModel_ItemLoadStatusChanged;
- FilesystemViewModel.DirectoryInfoUpdated += FilesystemViewModel_DirectoryInfoUpdatedAsync;
+ FilesystemViewModel.DirectoryInfoUpdated += FilesystemViewModel_DirectoryInfoUpdated;
FilesystemViewModel.PageTypeUpdated += FilesystemViewModel_PageTypeUpdated;
FilesystemViewModel.OnSelectionRequestedEvent += FilesystemViewModel_OnSelectionRequestedEvent;
FilesystemViewModel.GitDirectoryUpdated += FilesystemViewModel_GitDirectoryUpdated;
@@ -98,7 +98,7 @@ protected override void ViewModel_WorkingDirectoryModified(object sender, Workin
UpdatePathUIToWorkingDirectory(value);
}
- private async void ItemDisplayFrame_NavigatedAsync(object sender, NavigationEventArgs e)
+ private async void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
{
ContentPage = await GetContentOrNullAsync();
@@ -122,7 +122,7 @@ private async void ItemDisplayFrame_NavigatedAsync(object sender, NavigationEven
};
}
- private async void KeyboardAccelerator_InvokedAsync(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
+ private async void KeyboardAccelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
{
args.Handled = true;
var tabInstance =
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml b/src/Files.App/Views/Shells/ModernShellPage.xaml
index 836abab1b3a1..20783e5d58e1 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml
@@ -23,7 +23,7 @@
@@ -76,7 +76,7 @@
x:FieldModifier="public"
BorderBrush="{x:Bind CurrentInstanceBorderBrush, Mode=OneWay}"
BorderThickness="{x:Bind CurrentInstanceBorderThickness, Mode=OneWay}"
- Navigated="ItemDisplayFrame_NavigatedAsync" />
+ Navigated="ItemDisplayFrame_Navigated" />
diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml.cs b/src/Files.App/Views/Shells/ModernShellPage.xaml.cs
index d9c0f5fd0541..f2677efd87df 100644
--- a/src/Files.App/Views/Shells/ModernShellPage.xaml.cs
+++ b/src/Files.App/Views/Shells/ModernShellPage.xaml.cs
@@ -60,7 +60,7 @@ public ModernShellPage() : base(new CurrentInstanceViewModel())
FilesystemViewModel = new ItemViewModel(InstanceViewModel.FolderSettings);
FilesystemViewModel.WorkingDirectoryModified += ViewModel_WorkingDirectoryModified;
FilesystemViewModel.ItemLoadStatusChanged += FilesystemViewModel_ItemLoadStatusChanged;
- FilesystemViewModel.DirectoryInfoUpdated += FilesystemViewModel_DirectoryInfoUpdatedAsync;
+ FilesystemViewModel.DirectoryInfoUpdated += FilesystemViewModel_DirectoryInfoUpdated;
FilesystemViewModel.PageTypeUpdated += FilesystemViewModel_PageTypeUpdated;
FilesystemViewModel.OnSelectionRequestedEvent += FilesystemViewModel_OnSelectionRequestedEvent;
FilesystemViewModel.GitDirectoryUpdated += FilesystemViewModel_GitDirectoryUpdated;
@@ -148,7 +148,7 @@ protected override void ViewModel_WorkingDirectoryModified(object sender, Workin
UpdatePathUIToWorkingDirectory(e.Path);
}
- private async void ItemDisplayFrame_NavigatedAsync(object sender, NavigationEventArgs e)
+ private async void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs e)
{
ContentPage = await GetContentOrNullAsync();
if (!ToolbarViewModel.SearchBox.WasQuerySubmitted)
@@ -174,12 +174,12 @@ private async void ItemDisplayFrame_NavigatedAsync(object sender, NavigationEven
};
if (parameters.IsLayoutSwitch)
- FilesystemViewModel_DirectoryInfoUpdatedAsync(sender, EventArgs.Empty);
+ FilesystemViewModel_DirectoryInfoUpdated(sender, EventArgs.Empty);
_navigationInteractionTracker.CanNavigateBackward = CanNavigateBackward;
_navigationInteractionTracker.CanNavigateForward = CanNavigateForward;
}
- private async void KeyboardAccelerator_InvokedAsync(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
+ private async void KeyboardAccelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
{
args.Handled = true;
var tabInstance =
diff --git a/src/Files.Core/ViewModels/Widgets/FileTagsWidget/FileTagsWidgetViewModel.cs b/src/Files.Core/ViewModels/Widgets/FileTagsWidget/FileTagsWidgetViewModel.cs
index 8b13c0814b42..157aa44b4c97 100644
--- a/src/Files.Core/ViewModels/Widgets/FileTagsWidget/FileTagsWidgetViewModel.cs
+++ b/src/Files.Core/ViewModels/Widgets/FileTagsWidget/FileTagsWidgetViewModel.cs
@@ -24,10 +24,10 @@ public FileTagsWidgetViewModel(Func openAction)
_openAction = openAction;
Containers = new();
- _fileTagsSettingsService.OnTagsUpdated += FileTagsSettingsService_OnTagsUpdatedAsync;
+ _fileTagsSettingsService.OnTagsUpdated += FileTagsSettingsService_OnTagsUpdated;
}
- private async void FileTagsSettingsService_OnTagsUpdatedAsync(object? _, EventArgs e)
+ private async void FileTagsSettingsService_OnTagsUpdated(object? _, EventArgs e)
{
Containers.Clear();