void Header_Click(object sender, RoutedEventArgs e) { // Determine what group the Button instance represents var group = ((FrameworkElement)sender).DataContext; // Navigate to the appropriate destination page, configuring the new page // by passing required information as a navigation parameter Frame.Navigate(typeof(GroupDetailPage), ((SampleDataGroup)group).UniqueId); }