Repository navigation
Issue 614 logical children order - #617
Merged
sharpSteff merged 3 commits intoJul 29, 2026
Merged
Conversation
…ual tree depth Inheritable dependency properties (FontSize, DataContext, ...) assigned to an ancestor of the DockingManager did not always reach the controls inside the panels. The DockingManager keeps the Layout*Controls, every LayoutItem.View and the content of every LayoutContent as its logical children. Most of them have a visual parent that differs from their logical parent and are therefore reachable from the DockingManager through two paths: directly as a logical child and through the visual tree of another logical child. WPF's DescendentsWalker walks logical children before visual children and visits every node at most once. A node reached through the visual tree first is dropped by TreeWalkHelper.OnInheritablePropertyChanged (its visual parent differs from its logical parent) and is then skipped on the later logical visit because it has already been seen - so both chances to apply the new value are lost. Whether this happens depended on the insertion order of the logical children. Enumerating the logical children ordered by descending visual tree depth guarantees that such a node is always reached through the logical tree first, which is the path that actually applies the value. As a side effect the enumeration now works on a snapshot, so the collection can no longer be modified while a tree walk is in progress. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018UymxkWV99ZP5ca6PDcCmV
…xtElement.FontSizeProperty ContentPresenter derives from FrameworkElement and has no FontSize property of its own, it only takes part in the inheritance of TextElement.FontSizeProperty. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018UymxkWV99ZP5ca6PDcCmV
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.
fixed #614