Skip to content

[Skia] Shapes arrange appear to be broken in certain cases #18265

Closed

Description

@Youssef1313

Current behavior

Using Basic_Shapes sample, there is at least one broken scenario using Ellipse, UniformToFill, FixedWidthLarge.

Here is WinUI vs Skia comparison:

image

Somehow, vertical alignment isn't taking effect?

Simple repro:

<Grid Width="150" Height="150" BorderBrush="Green" BorderThickness="1">
<Ellipse Width="300" Stretch="UniformToFill" HorizontalAlignment="Left" VerticalAlignment="Bottom" Fill="Red" />
</Grid>

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

Activity

  1. added
    kind/bug
    triage/untriaged
    difficulty/tbd
    area/skia ✏️
    project/layout 🧱
    project/shapes-brushes 🔶
    on Sep 21, 2024
  2. Youssef1313 commented on Sep 21, 2024

    @Youssef1313
    MemberAuthor

    @MartinZikmund FYI, the popup opens in the wrong direction on Skia for this sample. Tracking in #18266

  3. Youssef1313 commented on Sep 21, 2024

    @Youssef1313
    MemberAuthor

    I'll get this fixed in #18261

  4. Youssef1313 commented on Sep 21, 2024

    @Youssef1313
    MemberAuthor

    And for future reference, the fix is this:

    image

  5. self-assigned this
    on Sep 21, 2024
  6. added theissue type on Jun 20, 2025
  7. MartinZikmund commented on Sep 24, 2025

    @MartinZikmund
    Member

    In Shape.layout.cs, for the UniformToFill stretch case, the code must change for return new Size(width, height) to return new Size(width, width). Include a comment that explains this:

    // Yes, it's intentional for this to be width, width.
    // This is the same as WinUI is doing.
    // The reasoning for this is if you have some code like:
    //
    // <Grid Width="150" Height="150" BorderBrush="Green" BorderThickness="1">
    //     <Ellipse Width="300" Stretch="UniformToFill"
    //              HorizontalAlignment="Left" VerticalAlignment="Bottom" Fill="Red" />
    // </Grid >
    //
    // In order to get "VerticalAlignment" working as expected, we need
    // to force the height to 300
    
  8. removed
    triage/untriaged
    on Sep 24, 2025
  9. github-actions commented on May 7, 2026

    @github-actions
    Contributor

    This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.

  10. added
    stale
    on May 7, 2026
  11. added
    good first issue
    low-hanging-🍒
    and removed
    stale
    on May 9, 2026
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

    area/skia ✏️difficulty/tbdgood first issuekind/buglow-hanging-🍒project/layout 🧱project/shapes-brushes 🔶

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions