Beispiel #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            // Get data objects and place them into an ObservableCollection
            List <CustomDataObject> tempList = CustomDataObject.GetDataObjects();
            ObservableCollection <CustomDataObject> Items  = new ObservableCollection <CustomDataObject>(tempList);
            ObservableCollection <CustomDataObject> Items2 = new ObservableCollection <CustomDataObject>(tempList);

            BasicGridView.ItemsSource   = Items2;
            ContentGridView.ItemsSource = Items;
            StyledGrid.ItemsSource      = Items;
        }
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            //Items = ControlInfoDataSource.Instance.Groups.Take(3).SelectMany(g => g.Items).ToList();
            BaseExample.ItemsSource = await Contact.GetContactsAsync();

            Control2.ItemsSource = await Contact.GetContactsAsync();

            contacts1 = await Contact.GetContactsAsync();

            contacts2.Add(new Contact("John", "Doe", "ABC Printers"));
            contacts2.Add(new Contact("Jane", "Doe", "XYZ Refridgerators"));
            contacts2.Add(new Contact("Santa", "Claus", "North Pole Toy Factory Inc."));

            Control4.ItemsSource = CustomDataObject.GetDataObjects();
            ContactsCVS.Source   = await Contact.GetContactsAsync();

            // Initialize list of contacts to be filtered
            contacts3 = await Contact.GetContactsAsync();

            contacts3Filtered = new ObservableCollection <Contact>(contacts3);

            FilteredListView.ItemsSource = contacts3Filtered;
        }