It's possible to create the eventhandler through XAML. also using codebehind can attach
event dynamically. It's usefull for dynamically craeate controls.
Example:
<Button Name="btnTest" Content="Test" Width="100" Background="Blue" Margin="1" Height="25"></Button>
public Page()
{
InitializeComponent();
btnTest.Click += btnTest_Click; //Attach Event
btnTest.Click -= btnTest_Click; //Detach Event
}
void btnTest_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Hi How are you");
}