The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
PageFunction<T>.Return Event
.NET Framework (current version)
Occurs when a called PageFunction<T> returns, and can only be handled by the calling page.
Assembly: PresentationFramework (in PresentationFramework.dll)
A calling page detects when a called PageFunction<T> returns by handling Return. Additionally, the calling page can retrieve the PageFunction<T> return value from the Result property of the ReturnEventArgs<T> which is passed to the event handler.
<object Return="ReturnEventHandler"/>
The following example shows how to handle the Return event.
void callPageFunctionButton_Click(object sender, RoutedEventArgs e) { // Create page function object GetStringPageFunction pageFunction = new GetStringPageFunction(); // Detect when page function returns pageFunction.Return += new ReturnEventHandler<String>(PageFunction_Return); // Call page function this.NavigationService.Navigate(pageFunction); } void PageFunction_Return(object sender, ReturnEventArgs<String> e) { // Retrieve page function return value string returnValue = e.Result; }
.NET Framework
Available since 3.0
Available since 3.0
Show: