/// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="navigationParameter">The parameter value passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested.
 /// </param>
 /// <param name="pageState">A dictionary of state preserved by this page during an earlier
 /// session.  This will be null the first time a page is visited.</param>
 protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
 {
   
     VM = (PresenterVM)navigationParameter;
     VM.ErrorMessage = string.Empty;
     this.DataContext = VM;
 }
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="navigationParameter">The parameter value passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested.
 /// </param>
 /// <param name="pageState">A dictionary of state preserved by this page during an earlier
 /// session.  This will be null the first time a page is visited.</param>
 protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
 {
     vm = (PresenterVM)navigationParameter;
     vm.ErrorMessage = string.Empty;
     this.DataContext = vm;
     this.BottomAppBar.IsOpen = true;
     this.BottomAppBar.IsSticky = true;
 }
        /// <summary>
        /// Populates the page with content passed during navigation.  Any saved state is also
        /// provided when recreating a page from a prior session.
        /// </summary>
        /// <param name="navigationParameter">The parameter value passed to
        /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested.
        /// </param>
        /// <param name="pageState">A dictionary of state preserved by this page during an earlier
        /// session.  This will be null the first time a page is visited.</param>
        protected override async void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
        {
            VM = (PresenterVM)navigationParameter;
            VM.ErrorMessage = string.Empty;
            await VM.LoadSurveysForCurrentUser();
            if(!VM.SurveyCollection.Any())
                CollectionIsEmptyNotification();

            this.BottomAppBar.IsOpen = true;
            this.BottomAppBar.IsSticky = true;

        }
 protected override void PreparetPrintContent()
 {
     if (firstPage == null)
     {
         vm = (PresenterVM)VM;
         var ht = 400;// itemListView.ActualHeight;
         var wd = 300; // itemListView.ActualWidth;
         var imgUrl = string.Format(url, vm.CurrentQuestion.Id, wd, ht);
         firstPage = new ReportPrint() { ImageUrl = imgUrl };
     }
     PrintingRoot.Children.Add(firstPage);
     PrintingRoot.InvalidateMeasure();
     PrintingRoot.UpdateLayout();
 }
Esempio n. 5
0
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="navigationParameter">The parameter value passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested.
 /// </param>
 /// <param name="pageState">A dictionary of state preserved by this page during an earlier
 /// session.  This will be null the first time a page is visited.</param>
 protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
 {
     vm = (PresenterVM)navigationParameter;
     vm.ErrorMessage = string.Empty;
 }