You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within a MenuBar the MenuFlyoutItem control's accelerator keys are aligned to the right when you first open the flyout, but all consequent opens will align the accelerator keys to the left.
Interestingly, it was a bug that caused it to show correctly the first time otherwise the actual bug would have caused them to always be left aligned.
The menu aligns the accelerator values by explicitly setting the size of all the TextBlock that contains the accelerator key text to the size of the largest one, and right aligning the TextBlock. The first calculation for these widths occurs too early so the TextBlocks are just the size of their content and when they are right aligned, the appear justified to the right. However, the second (and subsequent) times that the dialog is shown it has computed the correct size of the largest Text blocks and so all the textblocks are the same size and aligned on both the right and left. BUT, the text in the text block was still being left aligned. Consequently, the accelerator strings appeared left aligned on the second (and subsequent) invocations.
Describe the bug
Within a
MenuBar
theMenuFlyoutItem
control's accelerator keys are aligned to the right when you first open the flyout, but all consequent opens will align the accelerator keys to the left.Steps to reproduce the bug
With this example code:
Expected behavior
alignment should be consistent when opening the flyout
Screenshots
First open:
All consequent opens:
NuGet package version
WinUI 3 - Windows App SDK 1.3.3: 1.3.230724000
Windows version
Windows 10 (21H2): Build 19044
Additional context
No response
The text was updated successfully, but these errors were encountered: