CommunityToolkit / Labs-Windows

A safe space to collaborate and engineer solutions from the prototyping stage all the way through polished finalized component for the Windows Community Toolkit.
Other
323 stars 44 forks source link

TitleBar control measuring issues #549

Closed Poker-sang closed 4 months ago

Poker-sang commented 4 months ago

Describe the bug

  1. When Content or Footer is too long, the TitleBar layout will overflow. However, since I can't predict the actual Width of the Title, I can't set the CompactStateBreakpoint accurately.
  2. Since Content and Footer have a padding, I had to set the Margin of the CommandBar "0,-4". Maybe you can remove Padding and use VerticalContentAlignment="Center" instead.

Steps to reproduce

repro 1. use long Content or Footer (or both), and set small CompactStateBreakpoint
repro 2. use CommandBar in Content or Footer, then you will find that the CommandBar is not fully displayed

Expected behavior

  1. Let the TitleBar limit the width of the Content and Footer, or allow the MaxWidth of the Title to be set, or have the TitleBar automatically adjust the CompactStateBreakpoint
  2. Remove Padding and use VerticalContentAlignment=‘Center’ instead.

Screenshots

image image

Code Platform

Windows Build Number

Other Windows Build number

26120.751

App minimum and target SDK version

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, but only if others can assist.

ghost1372 commented 4 months ago

Forget about titlebar, wasdk introduced a native titlebar control you can try it in v1.6 exp1

Poker-sang commented 4 months ago

@ghost1372 Thanks for heads-up. I just tried wasdk1.6 and encountered a lot of bugs. The most important thing is that the TitleBar doesn't show the Content/Footer at all, have you encountered this problem?

ghost1372 commented 4 months ago

I did not test it yet, i will try it tonight

ghost1372 commented 4 months ago

@Poker-sang there is a MS Build video on youtube. ms team used this new titlebar and was working fine i need to find that video.

Poker-sang commented 4 months ago

thanks

niels9001 commented 4 months ago

@Poker-sang there is a MS Build video on youtube. ms team used this new titlebar and was working fine i need to find that video.

https://youtu.be/WR4T24lLoVo?si=_lxZw-OQ14U7MPgJ&t=827 Here you go!

Poker-sang commented 4 months ago

I wrote the simplest repro following the video. But there is still no Content: image