/// <summary>
 /// The load silly people.
 /// </summary>
 /// <returns>
 /// The <see cref="Task"/>.
 /// </returns>
 private async Task <ObservableCollection <SillyDudeVmo> > LoadSillyPeopleAsync()
 {
     SillyOfTheDay = new SillyDudeVmo(await _sillyDudeService.GetRandomSilly(), GoToSillyDudeCommand);
     RaisePropertyChanged(nameof(SillyOfTheDay));
     return(new ObservableCollection <SillyDudeVmo>(
                (await _sillyDudeService.GetSillyPeople())
                .Select(dude => new SillyDudeVmo(dude, GoToSillyDudeCommand))));
 }
        /// <summary>
        /// The load silly people.
        /// </summary>
        /// <returns>
        /// The <see cref="Task"/>.
        /// </returns>
        private async Task <ObservableCollection <SillyDudeVmo> > LoadSillyPeopleAsync()
        {
            SillyOfTheDay = new SillyDudeVmo(await _sillyDudeService.GetRandomSilly(), GoToSillyDudeCommand);
            RaisePropertyChanged(nameof(SillyOfTheDay));
            var result = new ObservableCollection <SillyDudeVmo>(
                (await _sillyDudeService.GetSillyPeople()).Select(
                    dude => new SillyDudeVmo(dude, GoToSillyDudeCommand)));

            // Test the drag and drop lock
            // result.First().Lock();
            // result.Last().Lock();
            return(result);
        }
        private async Task AddSillyDudeAsync()
        {
            var newDude = await _sillyDudeService.GetRandomSilly(0);

            SillyPeople.Insert(SillyPeople.Count - 2, new SillyDudeVmo(newDude, null));
        }
Beispiel #4
0
        private async Task <SillyDudeVmo> InitializationTask()
        {
            var dude = await _sillyDudeService.GetRandomSilly();

            return(new SillyDudeVmo(dude, GoToSillyDudeCommand));
        }