This project is read-only.

passing info from page to content

Nov 12, 2013 at 10:37 PM
Edited Nov 14, 2013 at 11:13 AM
Hi all!
At first, thanks for this great project.
At second, sorry for my English, not native speaker here...

Now the question:
I have in the generated mui project MainWindow.xaml which has some links as follows:
        <mui:LinkGroup DisplayName="club">
                <mui:Link DisplayName="first team" Source="/Pages/Club/Team.xaml?first" />
                <mui:Link DisplayName="reserve team" Source="/Pages/Club/Team.xaml?reserve" />
                <mui:Link DisplayName="youth team" Source="/Pages/Club/Team.xaml?youth" />
in the Team.xaml I have some tabs:
<mui:ModernTab Layout="Tab" SelectedSource="Content/TeamParts/Squad.xaml">
                <vm:TeamVM />

                <!-- TODO: set @Source -->
                <mui:Link DisplayName="squad" Source="Content/TeamParts/Squad.xaml" />
                <mui:Link DisplayName="training" Source="Content/TeamParts/Training.xaml" />
                <mui:Link DisplayName="tactic" Source="Content/TeamParts/Tactic.xaml" />

now what I want to achieve: I am trying to reuse the team page for the three team types: first, reserve... So when I click on the First team in links, I would like to show the squad of the first team, the tactic and also the training for the first team. How can I pass the parameter to the content page Team.xaml? As you can see, I tried using ViewModel, but still beginner whit this. I tried the loader too as I was succesfull in achieving this in the FIrstFloor.ModernUI.App with the LoremIpsumList modernTab to show in the content witch tab was selected. I've done this with passing the uri in the loader to the constructor of the LoremIpsum and there setting the parsed uri right to the textbox.

But here its little bit complicated as I can not create content loader in the section where the links reside and if I put the loader as shown in the team.xaml, its getting endlessly recreating itself.

thanks for any help
Nov 14, 2013 at 3:44 PM
Hi Zavael,
You must use "#" instead of "?" to send the parameter, so your code gets like this:
<mui:Link DisplayName="first team" Source="/Pages/Club/Team.xaml#first" />
Nov 15, 2013 at 7:52 AM
OK, thanks I will remember that, but I still dont know how to display the club for the first team when comming from that link.
I tried to use ContentLoader, but with no success.