新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
WPF頁面跳轉(zhuǎn)實(shí)現(xiàn)方法詳解
WPF頁面跳轉(zhuǎn)在實(shí)際程序開發(fā)中是經(jīng)常會(huì)被用到的一個(gè)功能需求。在實(shí)現(xiàn)WPF頁面跳轉(zhuǎn)這一功能的時(shí)候,可以分為兩種情況,分別為:前臺(tái)跳轉(zhuǎn)和后臺(tái)跳轉(zhuǎn)。#t#

創(chuàng)新互聯(lián)公司主營萬山網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,app開發(fā)定制,萬山h5成都微信小程序搭建,萬山網(wǎng)站營銷推廣歡迎萬山等地區(qū)企業(yè)咨詢
WPF頁面跳轉(zhuǎn)之前臺(tái)轉(zhuǎn):
- < TextBlock FontSize="24"
TextWrapping="Wrap"
Margin="0,0,0,-19.998"> - < Hyperlink x:Name="LnkPre"
NavigateUri="Page2.xaml"
Foreground="Black"> - Enter Page2
- < /Hyperlink>
- < /TextBlock>
WPF頁面跳轉(zhuǎn)之后臺(tái)轉(zhuǎn):
- NavigationService.GetNaviga
tionService(this).Navigate
(new Uri("Page2.xaml",
UriKind.Relative));- NavigationService.GetNavi
gationService(this).GoForward();
向后轉(zhuǎn)- NavigationService.GetNavi
gationService(this).GoBack();
向前轉(zhuǎn)- 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;
網(wǎng)站題目:WPF頁面跳轉(zhuǎn)實(shí)現(xiàn)方法詳解
標(biāo)題網(wǎng)址:http://www.5511xx.com/article/dpjohpp.html


咨詢
建站咨詢
