24 lines
483 B
C#
24 lines
483 B
C#
using Microsoft.UI.Xaml;
|
|
using TitleBar = Microsoft.UI.Xaml.Controls.TitleBar;
|
|
|
|
namespace winui_learning_3;
|
|
|
|
public sealed partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
ExtendsContentIntoTitleBar = true;
|
|
SetTitleBar(AppTitleBar);
|
|
}
|
|
|
|
private void AppTitleBar_BackRequested(TitleBar titleBar, object args)
|
|
{
|
|
if (RootFrame.CanGoBack)
|
|
{
|
|
RootFrame.GoBack();
|
|
}
|
|
}
|
|
}
|
|
|