public Feed() { InitializeComponent(); Loaded += Feed_Loaded; Unloaded += Feed_Unloaded; _feedViewModel = new FeedViewModel(); _feedAnalyticsTracker = new FeedAnalyticsTracker(Appboy.SharedInstance.EventLogger); _impressionTimer = new DispatcherTimer(); _impressionTimer.Tick += CalculateCardImpressions; _impressionTimer.Interval = new TimeSpan(0, 0, 1); FeedProgressBar.DataContext = _feedViewModel; FeedListBox.DataContext = _feedViewModel.Cards; NetworkErrorMessage.DataContext = _feedViewModel; FeedEmptyMessage.DataContext = _feedViewModel; }
public Feed() { InitializeComponent(); Loaded += Feed_Loaded; Unloaded += Feed_Unloaded; _feedViewModel = new FeedViewModel(); _feedAnalyticsTracker = new FeedAnalyticsTracker(Appboy.SharedInstance.EventLogger); _impressionTimer = new DispatcherTimer(); _impressionTimer.Tick += CalculateCardImpressions; _impressionTimer.Interval = new TimeSpan(0, 0, 1); FeedProgressBar.DataContext = _feedViewModel; FeedListBox.DataContext = _feedViewModel.Cards; NetworkErrorMessage.DataContext = _feedViewModel; FeedEmptyMessage.DataContext = _feedViewModel; }