Skip to content

RelativePanel does not measure correct size in certain configuration #431

Closed

Description

@danwalmsley

Describe the bug
A clear and concise description of what the bug is.
Expected behavior (according to UWP) is that relativepanel sizes to the content, unless alignment = stretch.

<RelativePanel Background="White" VerticalAlignment="Top" HorizontalAlignment="Left">
            <Rectangle Name="rect1" Height="20" Width="20" Fill="Red"  />
            <Rectangle Name="rect2" Height="10" Width="10" Fill="Yellow" RelativePanel.AlignBottomWithPanel="True" />
          </RelativePanel>

in uwp this produces..
image

but in HandyControl.RelativePanel we get...
image

The issue is that Measure does not create a graph and calculate the correct size.

So arrange tells the graph is has the available space.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • .net: [e.g. 4.6.2]
  • IDE [e.g. vs2017]
  • Version [e.g. 1.0.0]

Additional context
Add any other context about the problem here.

Activity

  1. danwalmsley commented on Jul 8, 2020

    @danwalmsley
    Author

    btw im not just an issue filer, with some direction or pointers I could submit a PR.

  2. added a commit that references this issue on Jul 8, 2020
  3. NaBian commented on Jul 8, 2020

    @NaBian
    Member

    fixed

  4. reopened this on Jul 11, 2020
  5. added a commit that references this issue on Mar 2, 2025
    b690906
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址