PageFunction.Return Event
.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 Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: 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; }
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: