Xamarin.forms: [Bug] [UWP] Button characterSpacing UWP not working

Created on 23 Jan 2020  路  2Comments  路  Source: xamarin/Xamarin.Forms

Description

Setting a button with CharacterSpacing does not respect it.

Steps to Reproduce

  1. Add a button with Text="Test" and CharacterSpacing=200 (for example). Also add it with a Label instead to see the difference.
  2. Run in UWP
  3. Label respects CharacterSpacing, Button does not.

Expected Behavior

Same behavior than Label

Actual Behavior

Does not have same behavior than Label -> No spacing

Basic Information

Version with issue: 4.4.0.991477
Last known good version: -
IDE: Visual Studio 2019 16.4.2
Platform Target Frameworks:
UWP: 18362
Affected Devices: Windows PC

button 5 help wanted UWP bug up-for-grabs

Most helpful comment

I can confirm this issue:
2020-01-24 (1)

Apparently a ContentPresenter more or less ignores CharacterSpacing. Not quite sure how to fix it, though. Perhaps by using a ContentTemplate - this would probably mean giving ImageButton it's own style, also. And there might be other ramifications, I imagine.

All 2 comments

I can confirm this issue:
2020-01-24 (1)

Apparently a ContentPresenter more or less ignores CharacterSpacing. Not quite sure how to fix it, though. Perhaps by using a ContentTemplate - this would probably mean giving ImageButton it's own style, also. And there might be other ramifications, I imagine.

I tried to solve the issue and it seems like it happens natively.
To verify that I created a new UWP app and used the CharacterSpacing property on a few elements.
The text of the button does not change at all.

That's why I created a new issue here: https://github.com/microsoft/microsoft-ui-xaml/issues/3490

We could wait till we get a response and when it's a native issue then we could either wait till it's fixed or manually create a button by composing some labels with boxviews and gestures.

Repro:
uwptemp.zip

This is a screenshot of the uwp app.
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MartinWegner picture MartinWegner  路  3Comments

jamiewest picture jamiewest  路  3Comments

joseluisct picture joseluisct  路  3Comments

EmilAlipiev picture EmilAlipiev  路  3Comments

rmarinho picture rmarinho  路  3Comments