Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Xamarin.Forms.Entry/Label does not diyplay decimal separator when binding a float to it. #6069

Closed
nicolaiw opened this issue May 2, 2019 · 4 comments
Labels
e/5 🕔 5 s/unverified New report that has yet to be verified t/bug 🐛

Comments

@nicolaiw
Copy link

nicolaiw commented May 2, 2019

Description

Hello guys,

I think i encountered a Bug with the Xamarin.Forms.Entry and the Xamarin.Forms.Label. This Bug seems to be culture/system language dependent. The Entry and Label does not show the decimal separator if I bind a float to it (system language de). The double and decimal values are displayed as expected (see screenshots below). I did not found a similar Issue/duplicate. Sorry if I missed one.

Steps to Reproduce

Sample repository

I created an empty new project with one xaml page. The corresponding ViewModel has three different properties. A float, a double and a decimal property as you can see in my uploaded sample.

ViewModel

The corresponding xaml view contains a Label and an Entry for each of the mentioned properties.

View

The BindingContext I set in the CodeBehind of the xaml view.

CodeBehind

This problem occures when the system language is set to de-DE. With e.g. en-US it seems to wok fine.

Another issue is that, when system language is set to de-DE, the numeric keyboards separator key does not work. This seems to bee related to #1898.

Expected Behavior

Entry and Label shows decimal separator on binded float value.

Actual Behavior

Decimal separator is not shown on Entry and Label for the bound float.

Basic Information

  • Xamarin.Forms 3.6.0.344457

  • IDE: VisualStudio Professional 2019 Version 16.0.1

  • Platform Target Frameworks: Android 8.1

  • iOS: not tested

  • Android Affected Devices
    Android 5.0 - API 21 (Samsung S4)
    Android 8.0 - API 26 (HUAWEI P Smart)
    Android 8.0 - API 26 (Galaxy Tab S3)

  • UWP: not tested

  • Android Support Library Version: Xamarin.Android.Support.v4 28.0.0.1

  • Nuget Packages: No additional Nuget Packages installed (Blank Xamarin Forms Template)

Screenshots

de-DE
alt tag

en-US
alt tag

Reproduction Link

https://github.com/nicolaiw/XamarinFormsFloatEntryLabel

Please let me know if I could provide more information.

Best regards.

@nicolaiw nicolaiw added s/unverified New report that has yet to be verified t/bug 🐛 labels May 2, 2019
@kingces95
Copy link
Contributor

image

@kingces95
Copy link
Contributor

image

@kingces95 kingces95 added the e/5 🕔 5 label May 2, 2019
@samhouts
Copy link
Member

samhouts commented May 6, 2019

Duplicate of #2049

@samhouts samhouts marked this as a duplicate of #2049 May 6, 2019
@samhouts samhouts closed this as completed May 6, 2019
@Crunch91
Copy link

Crunch91 commented Jul 2, 2019

Duplicate of #2049

I don't think that this is a duplicate. Issue #2049 is about converting DateTimes in local format instead of leaving them in default en-US format.
But it's not the point for this issue #6069. When Binding a double value to a label/entry with culture == de the point seperator appears. However binding a float value the point seperator does not appear. To be straightforward the point seperator should appear either for double and for float. I do not complain about the wrong separator for the given culture (it's the content of tickets #2049 #3700).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e/5 🕔 5 s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

4 participants