Xamarin.Forms 字符串格式不显示绑定信息

nap*_*i15 0 xaml xamarin xamarin.forms

我正在尝试在 Xamarin Forms 中以字符串格式显示产品价格:

Text="{Binding Price,  StringFormat=' Price is  {0:$}'}"
Run Code Online (Sandbox Code Playgroud)

输出:

价格为 $

我做错了什么以及为什么未显示绑定价格?

Bru*_*iro 5

You should use the Currency Format instead.

<Label Text="{Binding Price StringFormat='Price is = {0:C}'}" />
Run Code Online (Sandbox Code Playgroud)