自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

WPF頁面跳轉(zhuǎn)實現(xiàn)方法詳解

開發(fā) 開發(fā)工具
WPF頁面跳轉(zhuǎn)對于初學(xué)者來說,掌握起來還是比較簡單的。主要分為前臺的WPF頁面跳轉(zhuǎn)和后天的跳轉(zhuǎn)之分。在這里為大家做一個簡要的介紹。

WPF頁面跳轉(zhuǎn)在實際程序開發(fā)中是經(jīng)常會被用到的一個功能需求。在實現(xiàn)WPF頁面跳轉(zhuǎn)這一功能的時候,可以分為兩種情況,分別為:前臺跳轉(zhuǎn)和后臺跳轉(zhuǎn)。#t#

WPF頁面跳轉(zhuǎn)之前臺轉(zhuǎn):

 

  1. < TextBlock FontSize="24" 
    TextWrapping="Wrap" 
    Margin="0,0,0,-19.998"> 
  2. < Hyperlink x:Name="LnkPre"
     NavigateUri="Page2.xaml" 
    Foreground="Black"> 
  3. Enter Page2  
  4. < /Hyperlink> 
  5. < /TextBlock> 

 

WPF頁面跳轉(zhuǎn)之后臺轉(zhuǎn):

 

  1. NavigationService.GetNaviga
    tionService(this).Navigate
    (new Uri("Page2.xaml", 
    UriKind.Relative));  
  2. NavigationService.GetNavi
    gationService(this).GoForward();
    向后轉(zhuǎn)  
  3. NavigationService.GetNavi
    gationService(this).GoBack(); 
     向前轉(zhuǎn)  
  4. if (Application.Current.
    Properties["TaskResult"] 
    == null) return;  
  5. bool taskResult = (bool)
    Application.Current.Properties
    ["TaskResult"];  
  6. if (!taskResult) return;  
  7. // If a task happened, 
    display task data  
  8. string taskData = (string)
    Application.Current.Properties
    ["TaskData"];  
  9. if (taskData == null) return;  
  10. // "End" the task be removing 
    state associated with   
  11. // its existence  
  12. Application.Current.Properties
    ["TaskResult"] = null;  
  13. Application.Current.Properties
    ["TaskData"] = null; 

 

責(zé)任編輯:曹凱 來源: 博客園
相關(guān)推薦

2009-02-17 10:40:26

頁面跳轉(zhuǎn)JSP教程

2009-12-16 17:24:26

Ruby on Rai

2009-12-28 16:10:38

WPF生成文件

2021-05-18 09:49:08

鴻蒙HarmonyOS應(yīng)用

2009-07-03 17:24:31

Servlet頁面跳轉(zhuǎn)

2009-12-02 19:42:24

PHP頁面自動跳轉(zhuǎn)

2009-12-02 20:02:18

PHP實現(xiàn)頁面跳轉(zhuǎn)

2009-12-28 13:28:03

WPF視頻

2009-12-28 16:00:36

WPF樣式繼承

2009-07-24 13:01:44

ASP.NET頁面跳轉(zhuǎn)

2011-05-11 16:54:49

JSP

2009-12-28 17:33:19

WPF視頻音頻

2012-04-19 16:41:24

Titanium視頻實現(xiàn)頁面跳轉(zhuǎn)

2010-08-05 09:39:17

Flex頁面跳轉(zhuǎn)

2009-12-28 11:14:29

WPF顯示文本

2009-12-24 13:31:25

WPF UI設(shè)計

2015-05-05 10:51:32

php頁面跳轉(zhuǎn)方法

2009-07-02 09:25:41

JSP實現(xiàn)頁面跳轉(zhuǎn)

2010-02-02 16:23:46

C++實現(xiàn)WPF動畫

2010-08-13 13:25:53

Flex頁面跳轉(zhuǎn)
點贊
收藏

51CTO技術(shù)棧公眾號