Adding content to Tab Pages

Apr 5, 2013 at 12:49 AM
Hello. I'm trying to add some content to a Tab Page using this line of code:
<mui:Link DisplayName="My Link" Source="Pages/MyPage.xaml"/>
This works fine for when I click on the link, but how do I set this as the default tab so when the page loads, it displays this tab first?

Thanks for any help.
Apr 5, 2013 at 6:52 AM
You can set the selected source for the tab control:
<mui:ModernTab SelectedSource="Pages/MyPage.xaml" Layout="Tab">
            <mui:ModernTab.Links>
                <mui:Link DisplayName="My Link" Source="Pages/MyPage.xaml"/>
            </mui:ModernTab.Links>
</mui:ModernTab>
See Pages/LayoutTab.xaml in the FirstFloor.ModernUI.App demo project as well.
Apr 5, 2013 at 10:47 AM
Edited Apr 5, 2013 at 10:52 AM
This is what I already have, but the source isn't selected when the tab page loads. It's only when I click on the link that the source loads. I need it to automatically load the source, but it isn't for some reason.

Also, where's this demo project? I can find the demo.exe, but is there a demo project file as well?

Thanks for you input.
Apr 5, 2013 at 11:24 AM
This is what I already have, but the source isn't selected when the tab page loads. It's only when I click on the link that the source loads. I need it to automatically load the source, but it isn't for some reason.
Ok, sorry, didn't get that from your question.
Also, where's this demo project? I can find the demo.exe, but is there a demo project file as well?
Just download the latest sources of the project.
Apr 6, 2013 at 12:11 AM
Ah, excellent, got it working. Thanks a lot.