diff --git a/src/Files.App/IBaseLayout.cs b/src/Files.App/IBaseLayout.cs index 988e255c8ee0..af6efce4226d 100644 --- a/src/Files.App/IBaseLayout.cs +++ b/src/Files.App/IBaseLayout.cs @@ -30,5 +30,7 @@ public interface IBaseLayout : IDisposable public BaseLayoutCommandsViewModel? CommandsViewModel { get; } public CommandBarFlyout ItemContextMenuFlyout { get; set; } + + public CommandBarFlyout BaseContextMenuFlyout { get; set; } } } diff --git a/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs b/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs index e34838829afa..61334860ead3 100644 --- a/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs +++ b/src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs @@ -93,14 +93,22 @@ public virtual void OpenItem(RoutedEventArgs e) public virtual void ShowProperties(RoutedEventArgs e) { if (SlimContentPage.ItemContextMenuFlyout.IsOpen) - SlimContentPage.ItemContextMenuFlyout.Closed += OpenProperties; + SlimContentPage.ItemContextMenuFlyout.Closed += OpenPropertiesFromItemContextMenuFlyout; + else if (SlimContentPage.BaseContextMenuFlyout.IsOpen) + SlimContentPage.BaseContextMenuFlyout.Closed += OpenPropertiesFromBaseContextMenuFlyout; else FilePropertiesHelpers.ShowProperties(associatedInstance); } - private void OpenProperties(object sender, object e) + private void OpenPropertiesFromItemContextMenuFlyout(object sender, object e) { - SlimContentPage.ItemContextMenuFlyout.Closed -= OpenProperties; + SlimContentPage.ItemContextMenuFlyout.Closed -= OpenPropertiesFromItemContextMenuFlyout; + FilePropertiesHelpers.ShowProperties(associatedInstance); + } + + private void OpenPropertiesFromBaseContextMenuFlyout(object sender, object e) + { + SlimContentPage.BaseContextMenuFlyout.Closed -= OpenPropertiesFromBaseContextMenuFlyout; FilePropertiesHelpers.ShowProperties(associatedInstance); }