PageFunction<T>.OnReturn(ReturnEventArgs<T>) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A PageFunction<T> calls OnReturn(ReturnEventArgs<T>) to return to the caller, passing a return value via a ReturnEventArgs<T> object.
protected:
virtual void OnReturn(System::Windows::Navigation::ReturnEventArgs<T> ^ e);
protected virtual void OnReturn(System.Windows.Navigation.ReturnEventArgs<T> e);
abstract member OnReturn : System.Windows.Navigation.ReturnEventArgs<'T> -> unit
override this.OnReturn : System.Windows.Navigation.ReturnEventArgs<'T> -> unit
Protected Overridable Sub OnReturn (e As ReturnEventArgs(Of T))
A ReturnEventArgs<T> object that contains the PageFunction<T> return value (Result).
The following example shows how to call OnReturn.
void doneButton_Click(object sender, RoutedEventArgs e)
{
// Complete the page function and return data of type T
OnReturn(new ReturnEventArgs<String>(this.pageFunctionData.Text));
}
Private Sub doneButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
' Complete the page function and return data of type T
OnReturn(New ReturnEventArgs(Of String)(Me.pageFunctionData.Text))
End Sub
OnReturn is called by a PageFunction<T> to initiate a navigation to the calling page.
This causes the Return event to be raised, in order for the calling page to:
Detect when the PageFunction<T> has returned.
Retrieve the return value from the PageFunction<T>.
Proizvod | Verzije |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET povratne informacije
.NET je projekat otvorenog koda. Odaberite vezu za pružanje povratnih informacija: