private void Button_Click_ViewReport(object sender, RoutedEventArgs e) { // View Expense Report ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.projectListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { //viewing expense report ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { // View Expense Report ExpenseReportPage expenseReportPage = new ExpenseReportPage(); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { // View Expense Report var expenseReportPage = new ExpenseReportPage(peopleListBox.SelectedItem); NavigationService?.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { // View Expense Report with custom constructor ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { // View Expense Report object data = this.peopleListBox.SelectedItem; ExpenseReportPage expenseReportPage = new ExpenseReportPage(data); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { // Create a new page of that class with the constructor argument, then navigate to the new page // This page is instantiated, it does not constantly exist in the same way as a static WinForm. It will automatically gather design code. ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); // Found the data context object!! this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { // View Expense Report ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); /*The event handler opens the ExpenseReportPage page*/ }
private void AprietoEnter(object sender, KeyEventArgs e) { // View Expense Report ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { // View Expense Report // The Click event handler now calls the constructor to pass the expense report data of selected person ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); }
private void viewButton_Click(object sender, RoutedEventArgs args) { // Create a new expense report page and pass it the selected person // by using the non-default constructor. ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); // Navigate to the expense report page this.NavigationService.Navigate(expenseReportPage); }
private void ViewInfo_Click(object sender, RoutedEventArgs e) { // ExpenseReportPage expenseReportPage = new ExpenseReportPage(); // this.NavigationService.Navigate(expenseReportPage); ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); }
private void NavigateToSelectedItem() { var reportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); var navigationService = this.NavigationService; if (navigationService != null) { navigationService.Navigate(reportPage); } }
// <summary> // Handles the button click event. // </summary> private void Button_Click(object sender, RoutedEventArgs e) { // Make sure there the user has selected an item before we proceed to the next page. if (this.peopleListBox.SelectedItem != null) { // Bind the selected item to the data context of the expense // report page, then navigate to the new page. ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); } // If we don't have an item, return void. else { return; } }
private void Button_Click(object sender, RoutedEventArgs e) { // View Expense Report ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, System.Windows.RoutedEventArgs e) { var expenseReportPage = new ExpenseReportPage(PeopleListBox.SelectedItem); NavigationService.Navigate(expenseReportPage); }
private void GoToReportPage(object sender, RoutedEventArgs e) { ExpenseReportPage expenseReportPage = new ExpenseReportPage(); this.NavigationService.Navigate(expenseReportPage); }
private void Button_Click(object sender, RoutedEventArgs e) { var reportPage = new ExpenseReportPage(peopleListBox.SelectedItem as Person); NavigationService.Navigate(reportPage); }