ExpenseIt Demo

This sample application is often used in talks and laboratory exercises to introduce the core Windows Presentation Foundation (WPF) technologies to developers. It demonstrates XBAPs, Navigation, Layout, Data Binding, Controls, and Styles.

C# (149.7 KB)
4,451 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
using System;
using System.Windows;
using System.Windows.Navigation;
using System.Windows.Controls;
using System.Collections;

namespace ExpenseIt
    public partial class AddExpensesPage : Page
        private void AddExpense(object sender, RoutedEventArgs args)
            Application app = (Application)System.Windows.Application.Current;
            ExpenseReport expenseReport = (ExpenseReport)app.FindResource("ExpenseData");
            expenseReport.LineItems.Add(new LineItem());

        private void ViewChart(object sender, RoutedEventArgs args)
            // Navigate to page
            this.NavigationService.Navigate(new Uri("ViewChartPage.xaml", UriKind.Relative));