http://msdn.microsoft.com/en-us/library/ms615540.aspx
Below is a simple sample.
PageFunction:
<PageFunction
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
x:Class="NavigateSample.PageFunction1"
x:TypeArguments="sys:String"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
Title="PageFunction1">
<Grid>
</Grid>
</PageFunction>
Show page and get result:
//Instantiate the edit page.
PageFunction1 editPage = new PageFunction1();
//Show the page.
this.NavigationService.Navigate(editPage);
//Get returned result.
string result;
editPage.Return += new ReturnEventHandler<string>((object obj, ReturnEventArgs<string> arg)=>
{
result = arg.Result;
});
No comments:
Post a Comment