xamarin/Xamarin.Forms

[Feedback] Xamarin Forms ContentPresenter doesn't display correctly in Right-to-Left after rotation

Aperta

#5025 aperta il 18 gen 2019

 (4 commenti) (1 reazione) (0 assegnatari)C# (1926 fork)batch import
a/rtle/4 :clock4:feedback-tickethelp wantedp/Androidp/iOS 🍎t/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

If you create a custom ContentView with a control template, the content assigned to the control does not display correctly after rotation if the FlowDirection is set to RightToLeft - regardless of whether it is from the device or if it is set explicitly.

On both iOS and Android (haven’t tested Windows yet), the contents shift to the right, extending past the edge of the screen.

Steps to Reproduce:

  1. Create a plain Xamarin Forms project supporting iOS and Android (and probably Windows)
  2. Create a new Forms ContentView XAML object
  3. Add a ControlTemplate with a ContentPresenter
  4. In MainPage.xaml, put the newly created ContentView onto the page
  5. Put content into the ContentView
  6. Change the FlowDirection to Right-to-Left
  7. Run the app and rotate it

A sample that reproduces the problem can be found here: https://www.dropbox.com/s/3pak9ighagqzlr4/XamarinFormsTest.zip?dl=0 View on Developer Community To find diagnostic information, see the original linked feedback ticket.

Source

772674

Guida contributor