In-app product - FormattedPrice with many decimal places

◇◆丶佛笑我妖孽 提交于 2020-01-25 17:35:24

问题


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>

来源:https://stackoverflow.com/questions/28150692/in-app-product-formattedprice-with-many-decimal-places

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!