Exemplo n.º 1
0
 public ThreadsViewModel(string threadID)
 {
     ThreadID = threadID;
     // TODO: get discussion by thread id from data store and set to ThisDiscussion for unique discussion
     ThisDiscussion = new DiscussionsMockDataStore().GetItemAsync(ThreadID).Result;
     LoadComments();
     AddCommentToList = new Command <string>(OnAddCommentToList);
 }
Exemplo n.º 2
0
 protected override void OnQueryChanged(string oldValue, string newValue)
 {
     base.OnQueryChanged(oldValue, newValue);
     if (string.IsNullOrWhiteSpace(newValue))
     {
         ItemsSource = null;
     }
     else
     {
         DMDS        = new DiscussionsMockDataStore();
         ItemsSource = DMDS.GetItemsAsync().Result
                       .Where(d => d.DiscussionOwner.ToLower().Contains(newValue.ToLower()))
                       .ToList <Discussion>();
     }
 }