public NewsDetailViewModel(IBernieClient client) { _client = client; Messenger.Default.Register<NotificationMessage<FeedEntry>>(this, (message) => { var entry = message.Content; if (message.Notification == "Selected_Entry") { _item.Id = entry.Id; _item.Title = entry.Title; _item.ArticleType = entry.ArticleType; _item.Date = entry.Date; _item.Body = entry.Body; _item.Url = entry.Url; if (entry.ImageUrl == "") { _item.ImageUrl = "ms-appx-web:///Assets/bleh.png"; //ImageUrl can't be a non-url, so this allows nothing to display when there isn't an image. } else { _item.ImageUrl = entry.ImageUrl; } } }); }
public HubPageViewModel(IBernieClient client, INavigationService navigationService) { _client = client; _navigationService = navigationService; PopulateAsync(); }
public NewsViewModel(IBernieClient client) { _client = client; PopulateAsync(); }
public ActionsViewModel(IBernieClient client) { _client = client; GetActionsAsync(); }