Hello. I make a schedule, and there is a problem: How to add a PivotItem to an existing Pivot, for some the title will be set programmatically, the content of which PivotItem is ListView, and the Listview is binding data. That is, the output should be PivotItem, the name of which corresponds to the days of the week, and in each of them there is a ListView with information about the schedule.
ListView:
<ListView x:Key="SubjectsTable"> <ListView.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="50"/> <ColumnDefinition Width="50"/> <ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <TextBlock Text="{Binding Weeks}" Grid.Column="0" TextWrapping="WrapWholeWords"/> <TextBlock Text="{Binding LessonTime}" Grid.Column="1" TextWrapping="WrapWholeWords"/> <StackPanel Orientation="Vertical" Grid.Column="2"> <TextBlock Text="{Binding Subject}" TextWrapping="WrapWholeWords" TextAlignment="Center"/> <TextBlock Text="{Binding LessonType}" TextAlignment="Center"/> </StackPanel> <TextBlock Text="{Binding Auditory}" Grid.Column="3" TextWrapping="WrapWholeWords"/> <TextBlock Text="{Binding FirstLastName}" Grid.Column="4" TextWrapping="WrapWholeWords"/> </Grid> </DataTemplate> </ListView.ItemTemplate> </ListView>