ButchersBoy / Dragablz

Dragable and tearable tab control for WPF
http://dragablz.net
MIT License
2.17k stars 321 forks source link

TabStripPlacement left doesn't show the scrollbar #226

Open PlotlyUser2 opened 5 years ago

PlotlyUser2 commented 5 years ago

When the TabStripPlacement left is set, the vertical scrollbar doesn't appear:

image

MainWindow logic:

    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            TabablzControl tb = new TabablzControl();

            TabItem tabItem;

            for (int i = 0; i < 15; i++)
            {
                tabItem = new TabItem
                {
                    Header = $"Tab_{i}"

                };

                tb.Items.Add(tabItem);
            }
            tb.TabStripPlacement = Dock.Left;

            MystackPanel.Children.Add(tb);
        }
    }

MainWindow.xaml

<Window x:Class="WpfApp3.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:local="clr-namespace:WpfApp3"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <StackPanel x:Name="MystackPanel">

    </StackPanel>
</Window>

It is fixable by wrapping the stackpanel with a ScrollViewer:

    <ScrollViewer>
        <StackPanel x:Name="MystackPanel">

        </StackPanel>
    </ScrollViewer>

However, when the mouse is placed on the tabs, they are no scrollable.

How to fix this?