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

Nested TabControl adorner visual bug #482

Open
bors97 opened this issue Jan 22, 2024 · 1 comment
Open

Nested TabControl adorner visual bug #482

bors97 opened this issue Jan 22, 2024 · 1 comment
Labels

Comments

@bors97
Copy link

bors97 commented Jan 22, 2024

Describe the bug
In case of a nested TabControl when dragging a TabItem the adorner's top part sinks to the child TabControl's height. Another (possibly) related bug is that you can drag on the child TabItem and it starts dragging the parent TabItem that is straight above the dragged child TabItem.

To Reproduce
Steps to reproduce the behavior:

  1. Create a nested tabcontrol
  2. Enable Drag and Drop on the parent Tab
  3. Drag either the parent or child TabItem.

Expected behavior
The adorner's top part is on the top of the dragged item.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
@bors97 bors97 added the Bug label Jan 22, 2024
@bors97
Copy link
Author

bors97 commented Jan 22, 2024

After some testing the issue seems to be that the GetVisualDescendents method searches by depth for the TabPanel instead of breadth, which leads to it finding the content's TabControl's TabPanel first. Replacing the current search with a breadth-first search algorithm seems to solve the issue.

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

No branches or pull requests

1 participant