Reputation: 3177
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?
Upvotes: 3
Views: 6771
Reputation: 1
If you use the Navigation window, Please use it.
ShowsNavigationUI="False"
Upvotes: 0
Reputation: 980
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" />
Upvotes: 10