Skip to content

ClipToBounds does not respect CornerRadius on ContentControl, ContentPresenter, and ExperimentalAcrylicBorder; only Border works #21998

Description

@zrt2399

Describe the bug

Image

To Reproduce

    <StackPanel Margin="20" Spacing="20">
        <ContentControl ClipToBounds="True" CornerRadius="20">
            <Rectangle Height="20" Fill="Blue" />
        </ContentControl>
        <ContentPresenter ClipToBounds="True" CornerRadius="20">
            <ContentPresenter.Content>
                <Rectangle Height="20" Fill="Blue" />
            </ContentPresenter.Content>
        </ContentPresenter>
        <Border ClipToBounds="True" CornerRadius="20">
            <Rectangle Height="20" Fill="Blue" />
        </Border>
        <ExperimentalAcrylicBorder ClipToBounds="True" CornerRadius="20">
            <Rectangle Height="20" Fill="Blue" />
        </ExperimentalAcrylicBorder>
    </StackPanel>

Expected behavior

No response

Avalonia version

12.1.1

OS

No response

Additional context

No response

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions