Ejemplo n.º 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            DataShareManager.Current.CurrentPageIndex = PageIndex.PicDetailPage;

            base.OnNavigatedTo(e);
            object[] parameters = e.Parameter as object[];
            if (parameters[0] != null)
            {
                var p = parameters[0] as BoringPic;

                phoneDuanCommentListView.DataContext   = _dViewModel = new DuanCommentViewModel();
                desktopDuanCommentListView.DataContext = _dViewModel = new DuanCommentViewModel();

                this.DataContext = _viewModel = new PicDetailViewModel(p);

                _dViewModel.Update(p.PicID);

                CurrentItem = p;
                DetailType  = (PicDetailType)parameters[1];
                ItemList    = parameters[2];
            }

            SystemNavigationManager.GetForCurrentView().BackRequested += PicViewerPage_BackRequested;

            //////////////////////////////////////////////
            phoneCommentSubmitButton.Focus(FocusState.Pointer);
            desktopCommentSubmitButton.Focus(FocusState.Pointer);
        }
Ejemplo n.º 2
0
        public CommentListControl()
        {
            this.InitializeComponent();

            this.DataContext = _dViewModel = new DuanCommentViewModel();
        }