Ich entwickle eine Windows-App, mit der Benutzer Ice Creams bestellen können. Ich versuche, eine Schaltfläche zu einer anderen Seite namens "Logorder" zu navigieren, aber immer einen Fehler zu erhalten. Ich habe ein Bild hochgeladen, um den Fehler anzuzeigen. Navigation zu einer anderen Windows-Telefon-Seite Fehler
-Code
Public NotInheritable Class MainPage
Inherits Page
Public Property NavigationService As Object
''' <summary>
''' Invoked when this page is about to be displayed in a Frame.
''' </summary>
''' <param name="e">Event data that describes how this page was reached.
''' This parameter is typically used to configure the page.</param>
Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs)
' TODO: Prepare the page for display here.
' TODO: If your application contains multiple pages, ensure that you are
' handling the hardware Back button by registering for the
' Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
' If you are using the NavigationHelper provided by some templates,
' this event is handled for you.
End Sub
Private Sub HyperlinkButton_Click(sender As Object, e As RoutedEventArgs)
End Sub
Private Sub button_Copy_Click(sender As Object, e As RoutedEventArgs) Handles button_Copy.Click
NavigationService.Navigate(New Uri("/logorder.xaml", UriKind.Relative))
End Sub
End Class
Xaml ...
<Page
x:Class="mobileapps.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:mobileapps"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Button x:Name="button_Copy" Content="Summary" HorizontalAlignment="Left" Margin="96,425,0,0" VerticalAlignment="Top" Width="191"/>
<HyperlinkButton Content="HyperlinkButton" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<HyperlinkButton Content="HyperlinkButton" HorizontalAlignment="Left" Margin="-232,186,0,0" VerticalAlignment="Top"/>
<HyperlinkButton Content="HyperlinkButton" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<HyperlinkButton Content="HyperlinkButton" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<HyperlinkButton Content="Log order" HorizontalAlignment="Left" Margin="134,332,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.106,-0.496" Click="HyperlinkButton_Click" NavigateUri="logorder.xaml"/>
<HyperlinkButton NavigateUri="logorder.xaml" />
</Grid>
Ihr Code-Snippet hinzufügen hier anstelle des Bildes, da – Eldho
Ist Pfad der Seite Methode richtige Navigieren? – Archana
Mögliches Duplikat von http://stackoverflow.com/q/4660142/50447 –