Xamarin Forms: How to do multiple pages within multiple pages (nested)? - c#

I've been searching for an answer to this for months. I have an app that will go from a login page (mainpage) to a 6-button menu page (menupage). Each of the 6 items on the menu page will then go to a 3 or 4 menu item page of it's own. I know that you are only supposed to put content pages as children of a navigation page, so I think that's out as a possible solution for the initial menupage. Can you nest tabbed pages (although that style is not what I'm looking for)?
All of the examples I've found online seem to address only one main page and a sub-page kind of hierarchy (parent - child). I'm looking for something that will support 3 levels and maybe even more (parent - child - grandchild, etc.).
Am I over-complicating this? Any advice on this would be welcomed.

I would recommend keeping your login page and your menu page in separate "stacks" i.e. change App.Current.MainPage when you swap between them.
As for the hierarchy, I can't see an issue. When you show menupage put it in a navigation page then just push the sub pages. You can have as many levels as you want.

If i understand you question correctly you could just use a master-detail page with 6 items, each of items being a tabbed page with sub-pages.
If the question was "how to include sub-pages into a page using a custom method", then take a look at: https://github.com/twintechs/TwinTechsFormsLib when you build the sample they have a custom page container for nesting pages insidem the only limitation is child pages can't be navigation ones.

Related

How can I build a link to navigate to the parent page inside of a 2sxc app using c# razor templates?

I'm building an app that lists out careers in a listing and also has a details template.
The pages in DNN are structured like this: Students (parent) > Organize (child)
I want to make a simple link in the details template (c# razor) to point back to the parent of this child page. So when I'm on Organize, make the link point back to "Students"
Looking through the 2sxc template editor, I see that I can get the parent page's ID using: #Dnn.Tab.ParentId but I'm not sure how to construct a link using that ID.
But how can I make a link to the parent page?
One simple thing you can always do is just href="/tabid/nnn" - so
Up
Based on your description, I am not sure that covers you 100% of the time, but seemed worth pointing out. :)
If you prefer a more "code" approach, use 2sxc's Link.To()...
Up
Reference

Active Reports - Find out what page a control is on before the final print

I need to find out what page a control is on after all the report data has been added. Depending on how much data has been added above (e.g. table rows), the control could be on page 1, 2 or even 3. The reason for needing the page number is to find out if that control straddles two pages. If it does then I want to nudge it down enough to make sure its not split over two pages
As the control in question is dynamically added during the ReportStart event I can't tell what page it will ultimately end up on as the report data hasn't been added yet.
I'm pretty sure i'll be able to do this in the Detail_BeforePrint event as it fires for each page of the report and this.PageNumber gives the current page.
Inside Detail_BeforePrint I can find the control using:
var myControl= this.Detail.Controls["MyControl"];
But myControl does not have any properties that might suggest what page its on. Can anyone help?
I'm using Active Reports 6 and Visual Studio 2010
What you're asking for is not possible to find out. You can retrieve the pageNumber from the report but that would tell you the last page the control will print to. The control does not have a page number because it is possible for it to print on more than one page.
However with that said, it is possible to get the effect you want using KeepTogether property. if you set it to true, AR will always try to keep the control on a single page and move it automatically for you. And it handles the case where the length of the control might more than a single page so it wouldn't need to be moved since that would have no effect. Hope this helps.

2 Navigation widgets with distinct style/structure on the same page in Orchard?

I am working on a theme for Orchard CMS that uses 2 different navigation menu widgets on the same page; a "main menu" in the header part of the page, and another menu in the footer.
Both menus (will) have a different DOM structure and different styles.
I figured out that by creating a Menu.cshtml in my theme's View/ folder I could overwrite the way menus are rendered, and altered it to fit the way I need the main nav menu in the header to be.
Now I want to add the footer menu, but it uses the same Menu.cshtml as template which completely breaks the footer (this can not be fixed simply by messing around with CSS).
Is there any way I can make the 2 widgets use different templates? For example have the second widget use Menu-Footer.cshtml instead of Menu.cshtml?
Enable widget alternates and shape tracer. You'll see new alternates for all your widgets that you can use in your theme to get the exact result you want. Don't forget to disable shape tracing when you're done.

Change view without navigating?

I am creating an App in which I have a menu that will display on every page. The menu contains navigation to another page, so I can avoid repeating the same code on every page and in XAML. How can I change the view of a page without navigating to another page?
Xaml allows you to handle Frames, which are quite like html's iframes :
http://msdn.microsoft.com/fr-fr/library/cc838245(v=vs.95).aspx
some frameworks, like caliburn micro, ease the use of such frames.
Hey Dont know exactly What you want,but according to my understanding you can use Pivot and Panorama control.
This is the best control according to your requirement.
Here is the sample code and description.
http://code.msdn.microsoft.com/wpapps/PanoramaPivot-Sample-332a7e06

Purpose of an EpiServer MenuList's page link?

Cannot seem to grasp the concept of PageLink attributes for EpiServer listing controls. I need to understand this: "PageLink: Provides a page reference to a page; the children of that page will become the collection used." Supposing I'd like to use a MenuList - what sort of 'children' will be/can be used as a datasource to a menu control?
According to the EPiServer documentation
As PageLink is guaranteed to be unique among all pages in a certain
EPiServer instances, it is used in the following example to create
unique IDs and names for HTML check boxes. The code is used to present
the visitor with a selection of pages and allows them to select one or
more for further processing.
My understanding is that if you set a PageLink in your listing control, it will have access to the child pages based on that page.

Categories

Resources