Localized System.Windows.Media.Color name

前端 未结 4 1064
小鲜肉
小鲜肉 2021-01-21 01:14

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 \"Bl

4条回答
  •  滥情空心
    2021-01-21 01:57

    As a follow-up to peetee's question and link to this German page about Netscape color names, I've built a small C# wrapper class that you can drop-into your project.

    To use, simply call it something similar to:

    string germanName = ColorNameGermanTranslator.GetGermanName(Color.Green);
    

    and you get the German name back. It uses the English name as a fallback.

提交回复
热议问题