WPF转换器:文化来自哪里 [英] WPF converters: where does the culture come from

查看:82
本文介绍了WPF转换器:文化来自哪里的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了WPF转换器类:

I've created a WPF converter class:

public class DoubleConverter : IValueConverter
{
    public object Convert(object value, Type TargetType, object parameter, CultureInfo culture)
    {
        //blah blah
    }
}

我想知道谁设置传递的文化参数。我希望它与当前的Windows设置相同,但似乎有所不同。

I wonder who sets the culture parameter that is passed. I would expect it to be the same as the current windows settings, but it appears to be different.

任何人?

推荐答案

此页面描述了WPF的一个错误(功能?),除非您采取措施另行指定以及解决方法,否则文化永远都是美国的。

This page describes a bug (feature?) of WPF where culture will always be en-US unless you take action to specify otherwise and how to fix it.

这篇关于WPF转换器:文化来自哪里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆