示例#1
0
        private static ObservableCollection <string> CreateDemoList(int count)
        {
            ObservableCollection <string> list = new ObservableCollection <string>();

            for (int i = 0; i < count; i++)
            {
                string item = SecondPage.CreateDemoListItem();
                list.Add(item);
            }
            return(list);
        }
示例#2
0
        public SecondPage()
        {
            InitializeComponent();
            this.Loaded += SecondPage_Loaded;

            // Create some demonstration data.
            this.DemoData = SecondPage.CreateDemoList(30);

            // Set the listbox data context (and the bound ItemsSource) to the demo data collection.
            this.reorderListBox.DataContext = this.DemoData;

            //// create a new instance of store data
            //storeData = new StoreData();
            //// set the source of the GridView to be the sample data
            //ItemGridView.ItemsSource = storeData.Collection;
        }