예제 #1
0
        public NavigateDataView()
        {
            InitializeComponent();
            mStore = new ProductStore();

            ICollection<Product> products = mStore.GetAll();
            this.DataContext = products;

            view = (ListCollectionView)CollectionViewSource.GetDefaultView(this.DataContext);
            view.CurrentChanged += new EventHandler(view_CurrentChanged);

            lstProducts.ItemsSource = products;
        }
예제 #2
0
 public DataTemplateList5()
 {
     InitializeComponent();
     mStore = new ProductStore();
     lstProducts.ItemsSource = mStore.GetAll();
 }