How to fasten ScrollViewer to TabPanel?

<TabControl Grid.Row="1" Margin="-2,-2" Padding="10,0" ItemsSource="{Binding Albums}" TabStripPlacement="Left"> <TabControl.Resources> <Style TargetType="{x:Type TabPanel}"> <Setter Property="Background" Value="#171717"></Setter> <Setter Property="Width" Value="{Binding ElementName=CreateAlbum, Path=ActualWidth}"></Setter> </Style> </TabControl.Resources> <TabControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" Height="70"> <Image Source="{Binding Image}" Width="60" Margin="10"> </Image> <TextBlock Text="{Binding Name}" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"> </TextBlock> </StackPanel> </DataTemplate> </TabControl.ItemTemplate> <TabControl.ContentTemplate> <DataTemplate> <TextBlock Text="{Binding Name}" /> </DataTemplate> </TabControl.ContentTemplate> </TabControl> 

enter image description here

  • In what sense is "screw"? What effect do you want to achieve? - VladD
  • @VladD, added gif-ku as tab tab behaves now. When you reduce the window or when the tab items will be too many should be able to scroll. - Lightness
  • And if in each TabItem place ListBox and then there already to place elements? - MaximK

0