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

TabView in title bar of window below buttons to minimize, maximize and close the window #3280

Closed
Thomas1664 opened this issue Sep 12, 2020 · 10 comments
Labels
area-TabView help wanted Issue ideal for external contributors no-issue-activity team-Controls Issue for the Controls team

Comments

@Thomas1664
Copy link

Describe the bug
When you want to use TabView control in combination with ExtendViewIntoTitleBar, the tabs are visible underneath the window controls

Steps to reproduce the bug
Follow the guidelines in the docs or see the "Complete TabView windowing sample" in XAML Controls Gallery app.

Expected behavior
TabView should not show up underneath the window controls

Screenshots
Screenshot (38)

Version Info

NuGet package version:
Microsoft.UI.Xaml 2.4.3

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Sep 12, 2020
@marcelwgn
Copy link
Contributor

@stmoy Is this a scenario we actively support/encourage? I know that in the case of the XAML Controls Gallery, that sample has multiple problems which are on our side (i.e. XAML Controls Gallery, not WinUI side).

@robloo
Copy link
Contributor

robloo commented Sep 13, 2020

I think this is useful to support. It's convention now to extend into the title bar even with tabbed interfaces like this example. It should be possible to at least set a custom margin to push the tab headers out from under the window buttons.

@marcelwgn
Copy link
Contributor

You can put content inside the TabStripFooter, e.g. an empty Grid occupying the necessary space to achieve the necessary padding. The question is if there should be a separate API here, similar to the NavigationView.IsTitlelBarAutoPaddingEnabled.

@robloo
Copy link
Contributor

robloo commented Sep 13, 2020

Ah, yes, I forgot about how the NavigationView automatically handles this. It would be great for the TabView to do the same. Both of these controls have evolved into a fundamental layout of applications and should support this scenario the same way.

@stmoy
Copy link
Contributor

stmoy commented Sep 14, 2020

Is this a scenario we actively support/encourage?

Yes, this is a "mainline" scenario. It's pretty gnarly to get right though...

Resizing the window fixes this issue. I'm not sure if this is a XCG bug or a Title bar bug - it seems like the latter to me especially since there is code to handle this case.

@StephenLPeters StephenLPeters added area-TabView help wanted Issue ideal for external contributors team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Sep 14, 2020
@marcelwgn
Copy link
Contributor

I don't think this is an issue with title bar, the values get passed to the TabView correctly, yet we can end up in that bad state. This is an issue with TabView not responding to the size changes of the TabFooter content. The root cause of this is this line:

<ColumnDefinition Width="*" x:Name="RightContentColumn"/>

Quite frankly, I am not quite sure what the best approach to fixing this would be, @teaP @stmoy @StephenLPeters What do you think?


@stmoy Regarding the mainline scenario, do you think the current way to support this is sufficient (by allowing to add the necessary spacing through the TabFooter) or should we have a separate API that would add the necessary padding automatically? NavigationView also has something similar where it changes the header position to not occlude content.

@stmoy
Copy link
Contributor

stmoy commented Sep 15, 2020

Regarding the mainline scenario, do you think the current way to support this is sufficient (by allowing to add the necessary spacing through the TabFooter) or should we have a separate API that would add the necessary padding automatically? NavigationView also has something similar where it changes the header position to not occlude content.

The TabFooter spacing isn't optimal, no. I think TabView often takes up the entire window, so this scenario should probably be better supported. Using NavigationView as a precedent for a new API makes sense to me. In the short term, though, it might be faster to fix the bug you highlighted above rather than introducing a new API...

@StephenLPeters
Copy link
Contributor

does nav view really have an API to handle this? I would imagine it being more automatic than that

@marcelwgn
Copy link
Contributor

There is the IsTitleBarAutoPaddingEnabled API, which updates the padding on some parts. Having this automatic is very difficult, since that would require some way to reliably detect whether or not the control is the root and is affected by the custom titlebar behavior or not.

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TabView help wanted Issue ideal for external contributors no-issue-activity team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

6 participants