xamarin/Xamarin.Forms

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

开放

#5,025 创建于 2019年1月18日

 (4 条评论) (1 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/rtle/4 :clock4:feedback-tickethelp wantedp/Androidp/iOS 🍎t/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南