How to call a Page function from XAML in WPF

If you need to pass data to the page function, you can create an instance of it and pass the data by setting a property. Or, as the following example shows, you can pass the data using a non-default constructor.

This is how your XAML page looks like where Hyperlink click event fires a click event.
<Page x:Class="UsingPageFunctionsSample.CallingPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="CallingPage"
>
<Hyperlink Name="callPageFunctionHyperlink" Click="callPageFunctionHyperlink_Click">Call Page Function</Hyperlink>
</Page>
Here is C# code behind code looks like:
void callPageFunctionHyperlink_Click(object sender, RoutedEventArgs e)
{
// Call a page function
GetStringPageFunction pageFunction = new GetStringPageFunction("initialValue");
this.NavigationService.Navigate(pageFunction);
}