Open new links in tabs and close tabs

Mar 30, 2014 at 3:04 PM
I am trying to have all the pages loaded in tabs that can be closed later.
To explain better:
having a main window like
<mui:ModernWindow x:Class="MyApp.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mui="http://firstfloorsoftware.com/ModernUI"
    Title="MyApp" IsTitleVisible="True"
    WindowState="Maximized">

<mui:ModernWindow.MenuLinkGroups>
    <mui:LinkGroup DisplayName="Menu 1">
        <mui:LinkGroup.Links>
            <mui:Link DisplayName="Option 1" Source="/Pages/o1.xaml" />
            <mui:Link DisplayName="Option 2" Source="/Pages/o2.xaml" />
            <mui:Link DisplayName="Option 3" Source="/Pages/o3.xaml" />
        </mui:LinkGroup.Links>
    </mui:LinkGroup>
    <mui:LinkGroup DisplayName="Menu 2">
        <mui:LinkGroup.Links>
            <mui:Link DisplayName="Option 4" Source="/Pages/o4.xaml" />
            <mui:Link DisplayName="Option 5" Source="/Pages/o5.xaml" />
        </mui:LinkGroup.Links>
    </mui:LinkGroup>
    </mui:LinkGroup>
</mui:ModernWindow.MenuLinkGroups>
</mui:ModernWindow>
How it behaves now (which one probably knows): if I click Option 1 o1 opens, then if I navigate to Option 5 o5 opens, and then if I navigate in the menu back to Option 1, o1 opens without reloading the page (in the exact state as I left it, e.g. if I input some data in a textbox, the data is still there when I click again on Option 1 in the menu).

What I need to do:
1 - when I navigate to Option 1 in the menu, open a new tab in a tab control with title Option 1 and containing o1 page.
2 - when I navigate to Option 5, open a new tab with title Option 5 and containing o5 page.
3 - if I click on Option 1 tab, it shows me the page exactly as I left it.
I can close any of the tabs (and here is another question: how to close a tab, I do not see a "close" button?).
4 - if I close Option 1 tab page o1 is disposed
5 - and if I click again Option 1 in the menu, a new tab with a fresh copy of o1 opens (like on step 1).
Hope I was clear enough.

Can anybody advise how to do this?

Many thanks.