Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pivot TabItem content is inheriting foreground from PivotHeaderItemForegroundUnselected #15

Closed
geometrikal opened this issue Dec 17, 2019 · 1 comment

Comments

@geometrikal
Copy link

geometrikal commented Dec 17, 2019

TabControl using TabControlPivotStyle has Foreground set to PivotHeaderItemForegroundUnselected (a light grey colour) in the root of the Style.

This causes all the text items in the TabItem to inherit this colour as foreground.

Solution is to remove setting the foreground here and instead set it in the triggers, e.g.:

<!-- Unselected -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition SourceName="Border"
                                           Property="IsMouseOver"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="SelectedPipe"
                                    Property="Visibility"
                                    Value="Collapsed" />
                            <Setter TargetName="ContentPresenter"
                                    Property="TextElement.Foreground"
                                    Value="{DynamicResource PivotHeaderItemForegroundUnselected}" />
                        </MultiTrigger>
@Kinnara
Copy link
Owner

Kinnara commented Dec 17, 2019

Thanks for the report and the solution. Actually DefaultTabItemStyle had the same issue, just not as visible. Both have been fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants