passing info from page to content

Nov 12, 2013 at 9:37 PM
Edited Nov 14, 2013 at 10: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:ModernWindow.MenuLinkGroups>
        <mui:LinkGroup DisplayName="club">
            <mui:LinkGroup.Links>
                <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" />
            </mui:LinkGroup.Links>
        </mui:LinkGroup>
    </mui:ModernWindow.MenuLinkGroups>
in the Team.xaml I have some tabs:
<mui:ModernTab Layout="Tab" SelectedSource="Content/TeamParts/Squad.xaml">
            <mui:ModernTab.DataContext>
                <vm:TeamVM />
            </mui:ModernTab.DataContext>

            <mui:ModernTab.Links>
                <!-- 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" />
            </mui:ModernTab.Links>

            <mui:ModernTab.ContentLoader>
                <loaders:TeamLoader/>
            </mui:ModernTab.ContentLoader>
        </mui:ModernTab>
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 2: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 6: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.