Kinnara / ModernWpf

Modern styles and controls for your WPF applications
MIT License
4.51k stars 450 forks source link

TabControl.Template Breaks Style #546

Open zeik07 opened 1 year ago

zeik07 commented 1 year ago

When adding a TabControl.Template the style breaks on the TabItems in a TabControl.

Without the TabControl.Template the TabItems are Grey until selected.

With the addition of the TabControl.Template the TabItems become black matching the background so you are unable to determine with tab is selected.

Here is the code snippet that breaks the styling.

Also attached are reference images.

        <TabControl.Template>
            <ControlTemplate TargetType="TabControl" >
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <ScrollViewer>
                        <TabPanel IsItemsHost="True"/>
                    </ScrollViewer>
                    <ContentPresenter Grid.Row="1" ContentSource="SelectedContent" />
                </Grid>                    
            </ControlTemplate>
        </TabControl.Template>

TabControl BrokenTabControl