Beispiel #1
0
        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            // Should be always called to update page title
            ShopproHelper.SetWorkSpaceBodyContentPageTitle(this, this.CurrentViewTitle);
            if (!this.isInitDone)
            {
                this.isInitDone     = true;
                this.ContentPageCtx = ModelProvider.Instance.GetContentPageContext(string.Format("/ItemListPage/{0}", this.NavigationContext.QueryString["q"]));
                if (int.Parse(this.NavigationContext.QueryString["q"]) == Globals.ALL_CATEGORIES)
                {
                    this.DefaultTitleDesc = "All items";
                }
                else
                {
                    this.DefaultTitleDesc = this.NavigationContext.QueryString["t"];
                }
                this.RefreshPage();
            }

            if (this.ContentPageCtx.ListChanged)
            {
                this.ContentPageCtx.ListChanged = false;
                this.RefreshPage();
            }

            // Debug.WriteLine("ItemListPage Hash: {0}, Uri: {1}, ContentPageCtx hash: {2}, View title: {3}", this.GetHashCode(), e.Uri.ToString(), this.ContentPageCtx.GetHashCode(), this.CurrentViewTitle);
        }
Beispiel #2
0
 // Executes when the user navigates to this page.
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     this.LockUnlockComboBox.SelectedIndex = -1; // Always select none
     this.ContentPageCtx            = this.ContentPageCtx = ModelProvider.Instance.GetContentPageContext(e.Uri.ToString());
     this.DataContext               = ViewModelHelper.Convert(this.ContentPageCtx.DataSource as ObservableCollection <user>);
     this.ItemsCountInCurrentPage   = (this.ContentPageCtx.DataSource as ObservableCollection <user>).Count;
     this.itemDataForm.CurrentIndex = this.ContentPageCtx.CurrentIndex;
     ShopproHelper.SetWorkSpaceBodyContentPageTitle(this, string.Format("Record {0} of {1} in current page", this.itemDataForm.CurrentIndex + 1, this.ItemsCountInCurrentPage));
 }
 // Executes when the user navigates to this page.
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     this.editMode                  = DataFormMode.ReadOnly;
     this.contentLoaded             = false;
     this.ContentPageCtx            = ModelProvider.Instance.GetContentPageContext(e.Uri.ToString());
     this.DataContext               = ViewModelHelper.Convert(this.ContentPageCtx.DataSource as ObservableCollection <tab>);
     this.TabsCountInCurrentPage    = (this.ContentPageCtx.DataSource as ObservableCollection <tab>).Count;
     this.itemDataForm.CurrentIndex = this.ContentPageCtx.CurrentIndex;
     ShopproHelper.SetWorkSpaceBodyContentPageTitle(this, string.Format("Record {0} of {1} in current page", this.itemDataForm.CurrentIndex + 1, this.TabsCountInCurrentPage));
 }
        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            ShopproHelper.SetWorkSpaceBodyContentPageTitle(this, this.CurrentViewTitle);
            if (!this.isInitDone)
            {
                this.isInitDone     = true;
                this.ContentPageCtx = ModelProvider.Instance.GetContentPageContext(e.Uri.ToString());
                this.RefreshPage();
            }

            if (this.ContentPageCtx.ListChanged)
            {
                this.ContentPageCtx.ListChanged = false;
                this.RefreshPage();
            }
        }
Beispiel #5
0
 // Executes when the user navigates to this page.
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     this.editMode       = DataFormMode.ReadOnly;
     this.ContentPageCtx = ModelProvider.Instance.GetContentPageContext(e.Uri.ToString());
     this.BeginUpdateEntireUI();
 }