AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.34k stars 2.2k forks source link

User control appearing inside and outside of tabitem #14081

Open ffquintella opened 8 months ago

ffquintella commented 8 months ago

Describe the bug

A user control that should be only inside the tab item is appearing inside and outside it ...

This is observed on a mac computer don't know if it happens on other plaftforms

To Reproduce

Creates a user control and a Tab item and put on inside the other then open developer tools

Expected behavior

it should only appear inside the tab item

Screenshots

Screenshot at Jan 02 12-24-55 Screenshot at Jan 02 12-26-13

Environment

timunie commented 8 months ago

TabControl works better using DataTemplates in 11.0.6, at least for now.

maxkatz6 commented 8 months ago

Is it a bug? It appears as a logical child in two places - inside of the TabItem, as you defined it there. And inside of the TabControl content, as it's where it is hosted, when selected. As a visual child, it should be only in one place - inside of the TabControl - ContentPresenter.

timunie commented 8 months ago

We had this, but should be fixed in nightly. So the question would be if you are having an actual issue using nightly? https://github.com/AvaloniaUI/Avalonia/issues/13750