Skip to content

Adding ScrollViewer on TabControl hides contents #15720

Answered by timunie
TangDave asked this question in Q&A
Discussion options

You must be logged in to vote
        <TabControl.Styles>
            <Style Selector="TabControl">
                <Setter Property="Template">
                    <ControlTemplate>
                        <DockPanel>
                            <ScrollViewer AllowAutoHide="False"
                                          DockPanel.Dock="Top"
                                          HorizontalScrollBarVisibility="Auto">
                                <ItemsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" />
                            </ScrollViewer>
                            <ContentPresenter Content="{TemplateBinding SelectedContent}" />
                        </DockPanel>
                    </ControlTemplate

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@timunie
Comment options

@TangDave
Comment options

@TangDave
Comment options

Answer selected by TangDave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants