Intersoft ClientUI Documentation
How-to: Refresh a Page

The following examples show how to refresh a UXPage using commanding and API.

Example

Description

The following code shows how to refresh a UXPage using command.

Code

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

Example

Description

The following code shows how to refresh a UXPage 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="RefreshButton" Content="Refresh" />
C#
Copy Code
public MainPage()
{
    ...
    RefreshButton.Click += new RoutedEventHandler(RefreshButton_Click);
}

void RefreshButton_Click(object sender, RoutedEventArgs e)
{
    ContentFrame.Refresh();
}
See Also

Concepts

Other Resources