PageFunction.Return-Ereignis
.NET Framework 3.0
Occurs when a called PageFunction returns, and can only be handled by the calling page.
Namespace: System.Windows.Navigation
Assembly: PresentationFramework (in presentationframework.dll)
XML-Namespaces: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML-Namespaces: http://schemas.microsoft.com/winfx/2006/xaml/presentation
A calling page detects when a called PageFunction returns by handling Return. Additionally, the calling page can retrieve the PageFunction return value from the Result property of the ReturnEventArgs which is passed to the event handler.
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; }