Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Enhancement] Modify The Code In GeometryExtensions.cs File To Add Support For Right To Left to CLIP Property #12674

Closed
hamiddd1980 opened this issue Oct 30, 2020 · 2 comments

Comments

@hamiddd1980
Copy link

Summary

Hi.currently the CLIP property doesn't support RightToLeft layout (both Android and iOS) and this causes the View doesn't render correctly when a Geometry is applied to it and the Flowdirection is RifgtToLeft (both Android and iOS).(please refer to Issue #11536 )
I think the problem can be solved by modifying the ToAPath and ToCGPath extension methods in GeometryExtensions.cs (Android and iOS)

API Changes

in ToAPath and ToCGPath extension method in GeometryExtensions.cs , the XF Geometry (LineGeometry , RectangleGeometry ,...) is converted to Path Object in Android and iOS.
to make it possible to support RightToLeft for Clip property ,it is necessary:
1-check if the FlowDirection is RightToLeft
2- if the FlowDirection is RightToLeft , this must be considered in calculation of Path points by positioning them toward Top-Right Coordinate like somewhat in following code:

native Path Left Point = (Element.Bounds.Right-Element.Margin.Left -Geometry.Left- Geometry.Width);

Intended Use Case

enabling RightToLeft support for CLIP property , makes it possible to use this feature in Multilingual/Right to left countries.

@PureWeen
Copy link
Contributor

@jsuarezruiz

@jfversluis
Copy link
Member

Thanks for this suggestion! As Xamarin.Forms is now in maintenance mode, this will not happen anymore for Xamarin.Forms. We're only adding bugfixes and stability fixes.

If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap. If not, feel free to open a discussion to discuss a change first or open an issue with a detailed feature request. Thanks!

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants