I have a WPF/XAML Window that navigates different Pages. The navigation is performed this way:
MainFrame.Navigate(new LoginPage(this));
The problem is that, at the first navigation, a bar appears on top of the Window:

How can I remove/hide it?
Step 1. In your Frame Tag Add the Event ContentRendered. as
<Frame Name="myFrame" ContentRendered="myFrame_ContentRendered" ></Frame>
Step 2. In the ContentRendered event handler set the NavigationUIVisibility Hidden for each page instead on calling the same on all the pages as.
private void myFrame_ContentRendered(object sender, EventArgs e)
{
myFrame.NavigationUIVisibility = System.Windows.Navigation.NavigationUIVisibility.Hidden;
}
or simply use : <Frame Source="YOURPAGE.xaml" NavigationUIVisibility="Hidden" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With