Intersoft ClientUI 8 > ClientUI Fundamentals > Navigation Overview > Navigation How-to Topics > How-to: Stop a Page from Loading |
The following examples show how to stop a UXPage from loading using commanding and API.
XAML |
Copy Code
|
---|---|
<Intersoft:UXPage... xmlns:Intersoft="http://intersoft.clientui.com/schemas"> ... <StackPanel... > <Intersoft:UXButton Name="StopButton" Content="Stop" Command="Intersoft:NavigationCommands.BrowseStop" /> </StackPanel> </Intersoft:UXPage> |
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="StopButton" Content="Stop" /> |
C# |
Copy Code
|
---|---|
public MainPage() { ... StopButton.Click += new RoutedEventHandler(StopButton_Click); } void StopButton_Click(object sender, RoutedEventArgs e) { ContentFrame.StopLoading(); } |