xamarin/Xamarin.Forms
[Bug] Icon not correctly centered with text when using FontImageSource
Aperta
#6632 aperta il 23 giu 2019
e/5 :clock5:help wantedp/Androidt/bug :bug:up-for-grabs
Metriche repository
- Star
- (5644 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Description
In a button, icon is not correctly centered with the text.
Steps to Reproduce
- Add a button to a page with a text and an icon using FontImageSource
- Set ContentLayout property of the button to "Left,0"
- Launch the app an go to the page
Expected Behavior
Icon and text are centered in the button, the icon appears just on the left of the text without space between them.
Actual Behavior
Text is centered in the button but the icon is not, there is a lot of space between text and button. It seems that ContentLayout property is not taken into account.
Basic Information
- Version with issue: Xamarin Forms 4.1
- IDE: VS 2019
- Platform Target Frameworks: Only tested on Android
- Android: 9.0
- Nuget Packages: Nuget from the default Shell templates
- Affected Devices: All devices
Screenshots

The button "SomeText" on the screenshot shows the icon not correctly centered.
Reproduction Link
Github repo : https://github.com/TechWatching/FontImageSourceIssue