I create dynamically ModernTab in the code behind with their informations (DisplayName and URI source).
Initialization of the ModernTab:
<Grid Style="{StaticResource ContentRoot}">
<mui:ModernTab Layout="List" Name="listEcole"
PreviewMouseLeftButtonUp="ModTab_PreviewMouseLeftButtonUp"/>
</Grid>
Code behind :
List<string> listEcoles = MainWindow._RE.ListEcoles();
foreach(string nomEcole in listEcoles)
{
listEcole.Links.Add(new Link()
{
DisplayName = nomEcole,
Source = new Uri("/Controles/EcoleControl.xaml", UriKind.Relative)
});
}
My problem is that i want to know the DisplayName of the selected link to put it in a property and use it in another UserControl.