xamarin/Xamarin.Forms

[Bug] Icon not correctly centered with text when using FontImageSource

开放

#6,632 创建于 2019年6月23日

 (2 条评论) (1 个反应) (0 位负责人)C# (1,926 个派生)batch import
e/5 :clock5:help wantedp/Androidt/bug :bug:up-for-grabs

仓库指标

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

描述

Description

In a button, icon is not correctly centered with the text.

Steps to Reproduce

  1. Add a button to a page with a text and an icon using FontImageSource
  2. Set ContentLayout property of the button to "Left,0"
  3. 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

FontImageSource_Issue

The button "SomeText" on the screenshot shows the icon not correctly centered.

Reproduction Link

Github repo : https://github.com/TechWatching/FontImageSourceIssue

贡献者指南