How do I set the selected link for modern window.

Jun 5, 2013 at 4:03 PM
Edited Jun 5, 2013 at 4:03 PM
The selected link property is available inside modernmenu.
My main window code looks something like this.

<mui:ModernWindow + some initialization
<mui:ModernWindow.MenuLinkGroups>
    <mui:LinkGroup DisplayName="Welcome">
        <mui:LinkGroup.Links>
            <mui:Link DisplayName="Introduction" Source="/Pages/Introduction.xaml" />
        </mui:LinkGroup.Links>
    </mui:LinkGroup>
    <mui:LinkGroup DisplayName="Layout">
        <mui:LinkGroup.Links>
            <mui:Link DisplayName="Wireframe" Source="/Pages/LayoutWireframe.xaml" />
            <mui:Link DisplayName="Basic" Source="/Pages/LayoutBasic.xaml" />
            <mui:Link DisplayName="Split" Source="/Pages/LayoutSplit.xaml" />
            <mui:Link DisplayName="List" Source="/Pages/LayoutList.xaml"  />
            <mui:Link DisplayName="Tab" Source="/Pages/LayoutTab.xaml" />
        </mui:LinkGroup.Links>
    </mui:LinkGroup>
</mui:ModernWindow.MenuLinkGroups>
</mui:ModernWindow>

Now, I want to set the selected linkgroup and link programatically from viewmodel to the main window. How do I achieve this?
Jun 7, 2013 at 8:20 AM
i failed todo this, have a look at this thread to see what i already tried (last entry):

https://mui.codeplex.com/discussions/443503
Coordinator
Jun 7, 2013 at 5:14 PM
You need to set the ModernWindow.ContentSource property to any of the existing link sources. The modern menu will automatically update its selected link and parent link group. There's no need to select a link group.

Please note that this works fine as long as the link sources are unique among all link groups.
May 7, 2014 at 12:37 PM
Edited May 8, 2014 at 12:43 PM
thanks