Most of the time, the event in Xaml is assigned to a codebehind function
Example:
*.xaml
*.cs
Another way is to use Inline code in the XAML file by using
Example:
*.xaml
<button click="OnBtnClicked" content="Click Me" height="30" name="btn" width="80"></button>
*.cs
void OnBtnClicked(object sender, RoutedEventArgs e)
{
btn.Content = "Thank you";
}
Another way is to use Inline code in the XAML file by using
<x:code>
element.<button click="OnBtnClicked" content="Click Me" height="30" name="btn" width="80">
<x:code>
<![CDATA[
void OnBtnClicked(object sender, RoutedEventArgs e)
{
btn.Content = "Thank you";
}
]]>
</x:code>
</button>