Edit

Share via


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

Definition

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

Parameters

e
ReturnEventArgs<T>

A ReturnEventArgs<T> object that contains the PageFunction<T> return value (Result).

Examples

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

Remarks

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:

Applies to

Product Versions

See also