Simply add the DataAccess.DataBinding assembly to your project, then bind your list.

Changes you make to your list will automatically be replicated to the datastore (add, delete).
If the objects in the list implement INotifyPropertyChanged Changes to the object will be replicated as well

using ConnectionManagement.Data;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DataAccess;

namespace ConnectionManagement
    /// <summary>
    /// Interaction logic for AddDatabase.xaml
    /// </summary>
    public partial class AddDatabase : Window
        private ObservableCollection<Database> data;
        public AddDatabase()

            data = new ObservableCollection<Database>();

            ServerList.ItemsSource = data;

Last edited Dec 14, 2013 at 6:38 PM by iamkrillin, version 4


No comments yet.