Fix tabbed layout tab ordering - #54
Merged
Merged
Conversation
…of style override Style setters (Style Selector="TabControl") have lower property-value priority than local values and are evaluated after the Fluent theme ControlTheme has already been applied, creating a window where the theme template can render tabs in its own order. Setting TabControl.Template directly as a local value ensures the custom template is in effect before the visual tree is attached, guaranteeing tabs render in their JSON definition order. Also inlines ItemsPresenter.ItemsPanel directly in the template rather than via a separate Style Selector="TabControl ItemsPresenter" setter, removing another style-timing dependency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tabbedlayout elements were displaying in an order other than their JSON definition orderTabControl.Templatewas set via aStyle Selector="TabControl"insideTabControl.Styles— a style setter, which has lower property-value priority than a local value and is evaluated after the Fluent theme'sControlThemehas already been appliedItemsPanelbeing set via a separateStyle Selector="TabControl ItemsPresenter"setterChanges
TabControl.Templateas a direct property (local value, highest priority, applied before visual tree attachment) instead of via a style overrideItemsPresenter.ItemsPaneldirectly in the template, removing the second style-timing dependencyTabItemvisual styles remain inTabControl.Styles(no ordering implications)Test plan
tabbedlayout element containing 3+ tabs🤖 Generated with Claude Code