示例#1
0
        public static async Task <IEnumerable <EventsGroupByDate> > GetGroupsAsyncd()
        {
            _sampleDataSource = new EventsDataSource();
            await _sampleDataSource.GetSampleDataAsync();

            return(_sampleDataSource.Groupsd);
        }
示例#2
0
        /// <summary>
        /// Populates the page with content passed during navigation.  Any saved state is also
        /// provided when recreating a page from a prior session.
        /// </summary>
        /// <param name="sender">
        /// The source of the event; typically <see cref="NavigationHelper"/>
        /// </param>
        /// <param name="e">Event data that provides both the navigation parameter passed to
        /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
        /// a dictionary of state preserved by this page during an earlier
        /// session.  The state will be null the first time a page is visited.</param>
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            try
            {
                var sampleDataGroups = await EventsDataSource.GetGroupsAsyncd();

                this.DefaultViewModel["Groupsd"] = sampleDataGroups;
                stb = 3;
                var sampleDataGroups1 = await EventsDataSource.GetGroupsAsyncw();

                this.DefaultViewModel["Groups1"] = sampleDataGroups1;
                whatsup.DataContext = sampleDataGroups1;
                stb = 1;
                Progress.Visibility = Visibility.Collapsed;
                //  var sampleDataGroups1 = await EventsDataSource.GetGroupsAsynch();
                //   ContentRoot.DataContext = sampleDataGroups1;
            }
            catch (Exception eq) { }
        }
示例#3
0
        private async void sort_Click(object sender, RoutedEventArgs e)
        {
            Progress.Visibility = Visibility.Visible;
            if (stb == 1)
            {
                stb = 0;
                var sampleDataGroups = await EventsDataSource.GetGroupsAsynch();

                this.DefaultViewModel["Groupsd"] = sampleDataGroups;
                sort.Label = "sort by date";
            }
            else
            {
                stb = 1;
                var sampleDataGroups = await EventsDataSource.GetGroupsAsyncd();

                this.DefaultViewModel["Groupsd"] = sampleDataGroups;
                sort.Label = "sort by date";
            }
            Progress.Visibility = Visibility.Collapsed;
        }