In-app product - FormattedPrice with many decimal

2019-09-03 15:16发布

问题:

I implemented in-app purchases inside universal app and for testing I use my own XML file with list of in-app products. On Windows 8.1 it works very well but on Windows Phone 8.1 FormattedPrice property is returning price with many decimal places. Am I able to somehow fix it because it looks really strange?

Sample: http://1drv.ms/1yVNhRw

<Product ProductId="product2" ProductType="Consumable">
  <MarketData xml:lang="de-de">
    <Name>Product Title 2</Name>
    <Price>49.99</Price>
    <CurrencySymbol>€</CurrencySymbol>
  </MarketData>
</Product>

<Product ProductId="product1" ProductType="Consumable">
  <MarketData xml:lang="de-de">
    <Name>Product Title 1</Name>
    <Price>8.99</Price>
    <CurrencySymbol>€</CurrencySymbol>
  </MarketData>
</Product>