public PostItemViewModel(PostListViewModel parent) : base(parent.BoardName) { this._parent = parent; this.NavigateLinkCommand = new RelayCommand<Hyperlink>(this.NavigateToLink); this.ShowRepliesCommand = new RelayCommand(this.ShowReplies); this.RefersTo = new List<long>(); this.ReferencesFrom = new List<long>(); }
public PostListPage() { this.InitializeComponent(); this.DataContext = this._viewModel = new PostListViewModel(this.popupPlaceholder); // app bar this._listApplicationBar = this.ApplicationBar; this._currentItemApplicationBar = this.CreateCurrentItemApplicationBar(); this.LocalizeAppBar(); // update progress indicator this._systemProgressIndicator = new ProgressIndicator() { IsIndeterminate = false, Text = Strings.Loading }; BindingOperations.SetBinding(this._systemProgressIndicator, ProgressIndicator.IsVisibleProperty, new Binding("IsLoadingAfterUpdate") { Source = this.DataContext }); BindingOperations.SetBinding(this._systemProgressIndicator, ProgressIndicator.ValueProperty, new Binding("ProgressAfterUpdate") { Source = this.DataContext }); SystemTray.SetProgressIndicator(this, this._systemProgressIndicator); // on selected post changed this._viewModel.SelectedPostChanged += this.OnSelectedPostChanged; }