0

On ModernUI, we have "ModernTab" isntead of using "TabControl" But How could I show "" inside of each tabs, instead of using userControl. My mean I looking to add "Grid" inside of each Tab

Code on ModernUI:

<mui:ModernTab SelectedSource="/Content/ControlsStylesButton.xaml" Layout="List">
            <mui:ModernTab.Links>
                <mui:Link DisplayName="Button" Source="/Content/ControlsStylesButton.xaml" />
                <mui:Link DisplayName="DataGrid" Source="/Content/ControlsStylesDataGrid.xaml" />
            </mui:ModernTab.Links>
        </mui:ModernTab>

My code on Normal WPF Window:

<TabControl    SelectionChanged="Selector_OnSelectionChanged">
<TabItem  Name="tiProfileEdit"  Header="profile"  >
<Grid>
//UI of this tab instead of using usercontrol
</Grid>
</TabItem>
<TabItem  Name="tiDataGrid"  Header="DataGrid"  >
<Grid>
//UI of this tab instead of using usercontrol
</Grid>
</TabItem>
</TabControl>
Meysam
  • 87
  • 5

1 Answers1

0

Add the <Grid> as the root element of the UserControl.

A Link is not a ContentControl and doesn't have any concept of direct content. It only has a Source property so it is nothing like a built-in TabItem.

mm8
  • 163,881
  • 10
  • 57
  • 88