I am thinking if the windows phone 7 button event is similar to ASP.NET development with C#, something like in the button, I set value to commandparameter in the XAML, and in the code behind, I get the commandparameter and redirect the page.
I haven't found any good examples for button event handling, any suggestions?
Thank you.
For the xaml:
<Button Tag="pageAddress" Click="Button_Click" />
And then on the code-behind:
private void Button_Click(object sender, RoutedEventArgs e)
{
Button _button = (Button)sender;
NavigationService.Navigate(new System.Uri(_button.Tag.ToString()));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With