diff --git a/AuraClick/MainWindow.xaml b/AuraClick/MainWindow.xaml index d27361b2..28800295 100644 --- a/AuraClick/MainWindow.xaml +++ b/AuraClick/MainWindow.xaml @@ -14,7 +14,13 @@ IsMaximizable="False" mc:Ignorable="d"> - + + + + diff --git a/AuraClick/MainWindow.xaml.cs b/AuraClick/MainWindow.xaml.cs index 2555422b..afaf0d8d 100644 --- a/AuraClick/MainWindow.xaml.cs +++ b/AuraClick/MainWindow.xaml.cs @@ -15,7 +15,9 @@ // You should have received a copy of the GNU General Public License // along with Aura Click. If not, see . +using Microsoft.UI.Input; using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Input; // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. @@ -45,4 +47,27 @@ private void TitleBar_BackRequested(TitleBar sender, object args) { RootFrame.GoBack(); } + + private void BackAccelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args) + { + if (RootFrame.CanGoBack) + { + RootFrame.GoBack(); + args.Handled = true; + } + } + + private void RootGrid_PointerPressed(object sender, PointerRoutedEventArgs e) + { + PointerPointProperties props = e.GetCurrentPoint(null).Properties; + + if (props.IsXButton1Pressed) + { + if (RootFrame.CanGoBack) + { + RootFrame.GoBack(); + e.Handled = true; + } + } + } } \ No newline at end of file