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); }
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>(); } }