Disable navigation buttons and navigation history within a WPF Navigation Page program

The Navigation functionality of WPF is pretty cool. It lets the developer create a wizard like program which walks the user through a number of consecutive steps from start to finish. All of which happens within a single window, similar to a web browser, but it’s a desktop program.

When implementing the WPF Navigation program I wanted to turn off the bar across the top which stored the navigation history and the navigation buttons.

The way I implemented the program was to host all the WPF pages within a single WPF MainWindow using the the FRAME element. There is an attribute named NavigationUIVIsibility which can be set to Automatic, Hidden or Visible. Simply setting the NavigationUIVIsibility to hidden removed, disabled the navigation buttons as well disabled, removed the blue bar across the top.


The below code is placed in the WPF MainWindow.

<Frame Name="mainFrame" Source="Page1.xaml" NavigationUIVisibility="Hidden" />