本文介绍了本地化System.Windows.Media.Color名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标准颜色名称是英文名称,确定。但我的应用程序是德国人,所以我想在我的组合框作为德国名字的颜色名称。而不是蓝,黄,等等。我想有布劳,盖尔布等。



是否有返回所有本地化功能名字呢?抑或是容易的,我改变此调用的文化

 < ObjectDataProvider的方法名=的GetType
对象类型={X:键入SYS:类型}
X:键=colorsTypeOdp>
< ObjectDataProvider.MethodParameters>
< SYS:字符串> System.Windows.Media.Colors,PresentationCore,
版本= 3.0.0.0,文化=中立,
公钥= 31bf3856ad364e35< / SYS:字符串>
< /ObjectDataProvider.MethodParameters>
< / ObjectDataProvider的>


解决方案

我已经找到一个有用的表格,让我有些翻译



我将使用文本和一个转换器,以显示德国的颜色名称。




:>在布兰登。我会尽快,因为我有RTFM删除我的答案

The standard color names are english names, ok. But my Application is german so I would like to have the color names in my ComboBox as german names. Instead of "Blue", "Yellow", etc. I would like to have "Blau", "Gelb", etc.

Is there a function that returns all localized names? Or is it that easy that I change the culture in this call?

<ObjectDataProvider MethodName="GetType"
                    ObjectType="{x:Type sys:Type}"
                    x:Key="colorsTypeOdp">
    <ObjectDataProvider.MethodParameters>
        <sys:String>System.Windows.Media.Colors, PresentationCore,
    Version=3.0.0.0, Culture=neutral, 
    PublicKeyToken=31bf3856ad364e35</sys:String>
    </ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
解决方案

I have found a useful table that gives me some Translations (english names and german ones) The table can be found at: http://farbe-computer.de/kapitel33.html

I will use the texts and a Converter to display the german color names.

At Brandon .. I'll delete my answer as soon as I have RTFM :)

这篇关于本地化System.Windows.Media.Color名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 19:41