漫漫技术人生路

C#

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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;

posted on 2009-07-24 18:06  javaca88  阅读(992)  评论(0编辑  收藏  举报