Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
2,520 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How
<controls:TabView
Grid.Row="1"
x:Name="Tabs"
TabWidthBehavior="Actual"
CanCloseTabs="False"
IsCloseButtonOverlay="False"
CanDragItems="False"
CanReorderItems="False"
AllowDrop="False"
SelectedTabWidth="200">
<!-- Tabs -->
<controls:TabViewItem>
<ListView
x:Name="List"
Padding="16"
IsItemClickEnabled="True"
ItemsSource="{x:Bind listItem}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Title}"
Style="{StaticResource TitleTextBlockStyle}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</controls:TabViewItem>
<controls:TabViewItem>
<TextBlock Padding="16">You can enable drag-and-drop and reorder the tabs too.</TextBlock>
</controls:TabViewItem>
</controls:TabView>
Put a Grid
inside the TabViewItem and then put the ListView inside the Grid.
The Grid will be limited to the visible space on the screen (unless you size it otherwise) and so won't expand indefinitely like the TabViewItem. It will also constrain the ListView to stop that growing to fit all its children/items.
The listview height appears to be larger than the screen + the vertical scrollbar doesn't appear at all.
I made a test and my ListView scrolls correctly without any Grid around it. This is my test page:
So I wonder if there is some other problem... can you add to your description the XAML that is outside controls:TabView?
Moreover: I think you should add Header property to both TabViewItem: without adding them I was unable to run my test app because I get a "System.Runtime.InteropServices.COMException"...