Intersoft ClientUI Documentation
How-to: Navigate Backward Through Navigation History

The following examples shows how to navigate backward through the navigation history using command and API.

Example

Description

The following code shows how to navigate backward through navigation history using command.

Code

XAML
Copy Code
<Intersoft:UXPage...
    xmlns:Intersoft="http://intersoft.clientui.com/schemas">
    ...
    <StackPanel... >
        <Intersoft:UXButton Name="BackButton" Content="Back" Command="Intersoft:NavigationCommands.BrowseBack" />
    </StackPanel>
</Intersoft:UXPage>

Example

Description

The following example shows how to navigate backward through navigation history using code.

Code

XAML
Copy Code
<Intersoft:UXFrame x:Name="ContentFrame"... >
    <Intersoft:UXFrame.UriMapper>
        <Intersoft:UriMapper>
            <Intersoft:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
            <Intersoft:UriMapping Uri="/{page}" MappedUri="/Views/{page}.xaml"/>
        </Intersoft:UriMapper>
    </Intersoft:UXFrame.UriMapper>
</Intersoft:UXFrame>

<Intersoft:UXButton Name="BackButton" Content="Back" />
C#
Copy Code
public MainPage()
{
    ...
    BackButton.Click += new RoutedEventHandler(BackButton_Click);
}

void BackButton_Click(object sender, RoutedEventArgs e)
{
    if (ContentFrame.CanGoBack) {
        ContentFrame.GoBack();
    }
}
See Also

Concepts

Other Resources