public MainWindow()
        {
            InitializeComponent();
            var data = new ShoppingListData();

            data.Add("Bananas");
            this.DataContext = data;
        }
Exemplo n.º 2
0
        public MainWindow()
        {
            var data = new ShoppingListData();

            data.Add("Diapers");
            data.Add("Formula");
            DataContext = data;
            InitializeComponent();
        }
        public MainWindow()
        {
            InitializeComponent();

            var data = new ShoppingListData();

            data.Add("Shrimp");
            data.Add("Potatoes");
            DataContext = data;
        }
Exemplo n.º 4
0
        public MainWindow()
        {
            InitializeComponent();

            var data = new ShoppingListData();

            data.Add("Bananas");
            data.Add("Formula");
            this.DataContext = data; // every xaml object has data context
        }
Exemplo n.º 5
0
        public MainWindow()
        {
            InitializeComponent();

            var data = new ShoppingListData();

            data.Add("Bananas");
            data.Add("Formula");

            this.DataContext = data; //EVERY xaml component has a data context, can inherit its parents or be set to its own
        }
Exemplo n.º 6
0
        public MainWindow()
        {
            InitializeComponent();

            DataContext = new ShoppingListData();

            var data = new ShoppingListData();

            data.Add("Big Chungus ps4");
            DataContext = data;
        }
Exemplo n.º 7
0
        public MainWindow()
        {
            InitializeComponent();

            var data = new ShoppingListData();

            data.Add("Bananas");
            data.Add("Formula");

            // binding object as data source for window:
            this.DataContext = data;
        }