以下代码不起作用:
private void fileNameLinkButton_Click(object sender, RoutedEventArgs e)
{
HyperlinkButton clickedLink = (HyperlinkButton)sender;
string uri = String.Format(
"/IsolatedStorageListing;component/SecondPage.xaml?id={0}",
clickedLink.Content);
NavigationService.Navigate(new Uri(uri, UriKind.Relative));
}
<ListBox Height="183"
Width="460"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Name="fileListBox">
<ListBox.ItemTemplate>
<DataTemplate>
<HyperlinkButton Name="fileNameLinkButton"
Content="{Binding}"
Click="fileNameLinkButton_Click" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
当我单击 HyperlinkButton 时,我的应用程序将关闭/退出。请帮忙!