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

ContentView does not respect IsClippedToBounds (does not clip children) #6656

Closed
philipag opened this issue Apr 29, 2022 · 2 comments
Closed
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working

Comments

@philipag
Copy link

Description

As shown in the repro sample, the translated pink box is not clipped by the ContentView.

Steps to Reproduce

  1. Build the repro sample and run under Android 11
  2. The ContentView left edge is bown and the pink content should be clipped by it, but it extends to the left of the ContentView.

Replacing the ContentView with something like Grid causes things to work normally.

layoutbug7.zip

Version with bug

Release Candidate 2 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 11

Did you find any workaround?

not for ContentView

Relevant log output

No response

@philipag philipag added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Apr 29, 2022
@jsuarezruiz jsuarezruiz added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Apr 29, 2022
@Redth
Copy link
Member

Redth commented May 2, 2022

Using a Border instead of BoxView fixes this.

This is an incompatibility with the old BoxView control which is deprecated. Please use Border instead.

image

@Redth Redth closed this as completed May 2, 2022
@philipag
Copy link
Author

philipag commented May 3, 2022

I'm afraid this has nothing to do with BoxView and needs to be reopened. If I replace BoxView with Grid as follows then the problem persists:

<ContentView Background="#330000ff" IsClippedToBounds="True"> <Grid> <Grid Background="#66ff0000" TranslationX="-50"/> </Grid> </ContentView>

image

@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants