maui icon indicating copy to clipboard operation
maui copied to clipboard

IsClippedToBounds not working when content is translated or scaled.

Open JPfahl opened this issue 2 years ago • 5 comments
trafficstars

Description

IsClippedToBounds is not being honored when the content of a contentview or stacklayout (any type) is translated or scaled. I am using translation and scale to zoom and pan images. This used to work.

Steps to Reproduce

<ContentView IsClippedToBounds="true" BackgroundColor="Red" HeightRequest="200"> <BoxView HeightRequest="200" WidthRequest="200" BackgroundColor="Green" TranslationY="100"/> </ContentView>

image

Link to public reproduction project repository

none

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows

Affected platform versions

iOS 15.5, android api33, windows 10.0.19041

Did you find any workaround?

No

Relevant log output

No response

JPfahl avatar May 17 '23 16:05 JPfahl

@JPfahl

This used to work.

Where did this used to work? Xamarin.Forms? Previous version of MAUI?

PureWeen avatar May 17 '23 18:05 PureWeen

Hi @JPfahl. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar May 17 '23 18:05 ghost

It work in previous versions of .NET Maui. Can't say for sure exactly when it broke.

JPfahl avatar May 17 '23 18:05 JPfahl

Verified this on Visual Studio Enterprise 17.7.0 Preview 3.0. Repro on Windows 11, Android 13.0-API33 and iOS 16.4 with below Project: 15138.zip

image

XamlTest avatar Jul 13 '23 08:07 XamlTest

@JPfahl

This used to work.

Where did this used to work? Xamarin.Forms? Previous version of MAUI?

Same problem. It works with Xamarin.Forms on Android and iOS. But not with Maui.

AlleSchonWeg avatar Jan 12 '24 11:01 AlleSchonWeg

Hi @JPfahl. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

I just re-tested this with the latest Version 17.11.0 Preview 1.1 with 9.0.0-preview.4.10690 using the supplied code:

<ContentView IsClippedToBounds="true" BackgroundColor="Red" HeightRequest="200"> <BoxView HeightRequest="200" WidthRequest="200" BackgroundColor="Green" TranslationY="100"/> </ContentView>

and it is still not fixed:

image

JPfahl avatar Jun 11 '24 13:06 JPfahl