Forum Xamarin Xamarin.Forms

StringFormat issue with bound Field

I have a application that uses Xaml for the views. One of the displayed fields is a price. Until recently it was fine, but noew when the price is a negative number, all that is displayed is a minus sign -

The Label is defined as:

  <Label StyleClass="SubHeader" Style="{StaticResource OrangeLabel}" Text="{Binding BankDetails.Balance, StringFormat=' {0:c}'}"  />

BankDetails.Balance is a decimal.

I have just updated to Forms v2.3.4.214-pre5

Has anyone come across this issue? Really don't want to have to create a Valueconverter for prices!

Thanks Ash

Best Answer

  • AshleyJacksonAshleyJackson GBMember ✭✭
    Accepted Answer

    The issue seems to have been caused by me using a style, removing the style and the the format works exactly as I would expect.

Answers

Sign In or Register to comment.