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

ComboBox dropdown / flyout opens in the wrong location when using certain RelativePanel attached properties #6554

Closed
1 of 2 tasks
blake-fm opened this issue Jan 6, 2022 · 2 comments

Comments

@blake-fm
Copy link

blake-fm commented Jan 6, 2022

Describe the bug

When using RelativePanel.LeftOf in the default tutorial as per repro, the dropdown / flyout left edge is anchored exactly 69px (not kidding) from the right edge of the ComboBox control.

When using RightOf, or no attached properties, left aligns to left as normal.

Other RelativePanel properties also change the alignment, e.g. AlignHorizontalCenterWith myButton halves the effect. Didn't measure that one, but it's a reasonably safe bet.

Steps to reproduce the bug

  1. Follow the WinUI 3 Unpackaged template steps
  2. Replace the StackPanel and its content with
    <RelativePanel>
        <Button x:Name="myButton"
                RelativePanel.AlignVerticalCenterWithPanel="True"
                RelativePanel.AlignHorizontalCenterWithPanel="True"
                Click="myButton_Click">Click Me</Button>
        <ComboBox RelativePanel.LeftOf="myButton"
                  RelativePanel.AlignVerticalCenterWithPanel="True"
                  SelectedIndex="1">
            <ComboBoxItem Content="Test item" />
            <ComboBoxItem Content="A reasonably long item" />
            <ComboBoxItem Content="A significantly longer item.  It's really, relly long.  Too long, maybe." />
        </ComboBox>
    </RelativePanel>
  1. Observe the whackiness

Expected behavior

Using RelativePanel attached properties have on their own no effect on the ComboBox, other than positioning the control in its flyout closed state.

Screenshots

LeftOf:
image
image

RightOf / no attached properties:
image
image

NuGet package version

WinUI 3 - Windows App SDK 1.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

May 2021 Update (19043)

Additional context

Screenshots are Win 11, also repro'd on 19043.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jan 6, 2022
@gabbybilka gabbybilka added the product-winui3 WinUI 3 issues label Feb 8, 2022
@StephenLPeters StephenLPeters added area-ComboBox area-Layouts team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Mar 2, 2022
@StephenLPeters
Copy link
Contributor

@ranjeshj FYI

@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.

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

No branches or pull requests

3 participants