Skip to content

Commit 3bea105

Browse files
committed
Implement Copy and Move operations
1 parent 11e55ce commit 3bea105

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Files.App/ViewModels/Layouts/BaseLayoutViewModel.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ public async Task DropAsync(DragEventArgs e)
211211
{
212212
Items =
213213
{
214-
new MenuFlyoutItem() { Text = string.Format("CopyToFolderCaptionText".GetLocalizedResource(), folderName) },
215-
new MenuFlyoutItem() { Text = string.Format("MoveToFolderCaptionText".GetLocalizedResource(), folderName) },
214+
new MenuFlyoutItem() { Text = string.Format("CopyToFolderCaptionText".GetLocalizedResource(), folderName), Command = new AsyncRelayCommand(async ct =>
215+
await _associatedInstance.FilesystemHelpers.PerformOperationTypeAsync(DataPackageOperation.Copy, e.DataView, _associatedInstance.ShellViewModel.WorkingDirectory, false, true))},
216+
new MenuFlyoutItem() { Text = string.Format("MoveToFolderCaptionText".GetLocalizedResource(), folderName), Command = new AsyncRelayCommand(async ct =>
217+
await _associatedInstance.FilesystemHelpers.PerformOperationTypeAsync(DataPackageOperation.Move, e.DataView, _associatedInstance.ShellViewModel.WorkingDirectory, false, true))}
216218
}
217219
};
218220

0 commit comments

Comments
 (0)