-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
Custom StackLayout (deriving from StackLayout with a custom LayoutManager), a first label (view1) is added initially and a second label (view2 with label2) is added on tap. The ContentPage FlowDirection is set to RightToLeft. After adding the second label, if label2 is measured explicitly inside LayoutMeasure, the first label (view1) is arranged/displayed in LeftToRight, ignoring the page-level RTL. If the measurement of label2 is skipped and view2.DesiredSize is used instead, the UI arranges correctly in RTL. but I must measure label2 directly for my implementation.
Steps to Reproduce
1.Run the sample.
2.tap on CustomLabel.
Expected output
After tapping to add the second label, both labels (view1 and view2) should respect RightToLeft layout:
Label text aligned and arranged according to RTL.
No switch to LeftToRight for view2.
Observed behavior
CustomLabel(label2) is arranged according to LTR.
Link to public reproduction project repository
Version with bug
10.0.0
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
10.0.0
Affected platforms
Android
Affected platform versions
Windows 11
Did you find any workaround?
Do not measure label2 directly; instead, measure the container (view2) and use view2.DesiredSize for arrangement.