PageFunction<T>.OnReturn(ReturnEventArgs<T>) Metoda

Definicja

Wywołania PageFunction<T>OnReturn(ReturnEventArgs<T>) w celu powrotu do obiektu wywołującego, przekazując wartość zwracaną ReturnEventArgs<T> za pośrednictwem obiektu.

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))

Parametry

e
ReturnEventArgs<T>

ReturnEventArgs<T> Obiekt, który zawiera wartość zwracaną PageFunction<T> (Result).

Przykłady

W poniższym przykładzie pokazano, jak wywołać metodę 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

Uwagi

OnReturn element jest wywoływany przez element , PageFunction<T> aby zainicjować nawigację do strony wywołującej.

Return Powoduje to, że zdarzenie jest zgłaszane, aby strona wywołująca:

Dotyczy

Zobacz też