Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有一列浮点数的 XamDataGrid,我希望这些浮点数用 InvariantCulture 显示,即用点而不是逗号。我怎样才能做到这一点?
XamDataGrid 控件中的任何列都继承自Infragistics.Windows.DataPresenter.Field已经支持 InvariantCulture 格式的类。因此,任何浮点类型数据都将使用当前区域格式设置显示。
Infragistics.Windows.DataPresenter.Field
如果需要以某种特定格式格式化数据,可以提供相应的转换器,如下所示:
<igDP:Field x:Name="Total" Converter="{StaticResource TotalFormatConverter}"/>
<igDP:Field x:Name="Total" Converter="{StaticResource TotalFormatConverter}"