xamarin/Xamarin.Forms

[Bug] iOS - ContentLayout ignored if text changed from empty string to text after button rendered

Offen

#8.646 geöffnet am 25.11.2019

 (3 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)C# (1.926 Forks)batch import
e/3 :clock3:help wantedp/iOS 🍎t/bug :bug:up-for-grabs

Repository-Metriken

Stars
 (5.644 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

The ContentLayout of a button is ignored on iOS if the text of the button is changed after the button is initially rendered.

If the button is defined like this in the XAML:

And then the text is changed like this:

Then the button looks like this on iOS:

Screenshot 2019-11-25 at 10 33 12

But it works correctly on Android:

Steps to Reproduce

  1. Start the app on an iOS simulator
  2. Tap the "Change Text" button

Expected Behavior

For both platforms, image should be shown on the right

Actual Behavior

On iOS, the image is shown on the left On Android, the image is shown on the right

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE: Visual Studio for Mac
  • Platform Target Frameworks:
    • iOS: 13.4.0.2
  • Nuget Packages: Xamarin Forms 4.3.991211
  • Affected Devices: iOS devices

Screenshots

(see description)

Reproduction Link

https://github.com/petermajor/ContentLayoutBug

Contributor Guide