WPF一(页面跳转)
前台转:
<TextBlock FontSize="24" TextWrapping="Wrap" Margin="0,0,0,-19.998">
<Hyperlink x:Name="LnkPre" NavigateUri="Page2.xaml" Foreground="Black">
Enter Page2
</Hyperlink>
</TextBlock>
后台转:
NavigationService.GetNavigationService(this).Navigate(new Uri("Page2.xaml", UriKind.Relative));
NavigationService.GetNavigationService(this).GoForward();向后转
NavigationService.GetNavigationService(this).GoBack(); 向前转
if (Application.Current.Properties["TaskResult"] == null) return;
bool taskResult = (bool)Application.Current.Properties["TaskResult"];
if (!taskResult) return;
// If a task happened, display task data
string taskData = (string)Application.Current.Properties["TaskData"];
if (taskData == null) return;
// "End" the task be removing state associated with
// its existence
Application.Current.Properties["TaskResult"] = null;
Application.Current.Properties["TaskData"] = null;