Question

When load to tab page, i want to focus second tab.it is a wpf application.I use MUI template for that. here is my code

<Grid Style="{StaticResource ContentRoot}">
    <!-- TODO: set @SelectedSource -->
    <mui:ModernTab Layout="Tab" AllowDrop="True" Name="tabcontroller" >
        <mui:ModernTab.Links  >
            <!-- TODO: set @Source -->
            <mui:Link DisplayName="Add User"   Source="/Content/Admin/AddUserPage.xaml"/>
            <mui:Link DisplayName="Manage User" x:Name="mngser"  Source="/Content/Admin/ManageUserPage.xaml"/>
            <mui:Link DisplayName="Add Suplier" Source="/Content/Admin/AddSuplierPage.xaml"/>
            <mui:Link DisplayName="Manage Suplier" Source="/Content/Admin/ManageSuplierPage.xaml"/>
        </mui:ModernTab.Links>
    </mui:ModernTab>
</Grid>
Was it helpful?

Solution

Try to set SelectedSource property of ModernTab to the same Source as the second tab :

........
<mui:ModernTab Layout="Tab" AllowDrop="True" Name="tabcontroller" 
            SelectedSource="/Content/Admin/ManageUserPage.xaml">
........
</mui:ModernTab>
........
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top