在DataGrid或列表中显示私人字符??? [英] Display Private Characters in DataGrid or List???

查看:75
本文介绍了在DataGrid或列表中显示私人字符???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

是否有代码可以使私有字符显示在DataGrid或列表中?

谢谢.

Andy

Hi everyone,

Is there code to get Private Characters to display into DataGrid or List?

Thanks.

Andy

推荐答案

我认为您是在谈论Unicode专用字符"(在专用区域(PUA)中).

它们并非设计为使用常规字体显示,因此您需要自己的自定义字体.你已经有一个吗?否则,您可以使用Windows随附的Microsoft应用程序私人字符编辑器"(PCE):eudcedit.exe.您需要在应用程序中定期使用此字体.

使用PCE,可以将专用字符"链接到系统字体库中的某些或所有字体.完成此操作后,您可以在任何System.Windows.Forms控件或WPF FrameworkElement中使用任何常规字体(如果已链接到使用PCE创建的专用字体).重要的是,您可以在一个字符串中混合使用私人字符和常规字符.

I think you’re talking about Unicode "private use characters" (in Private Use Areas (PUA)).

They are not designed to be displayed using regular fonts, so you need your own custom font. Do you already have one? In not, you can use Microsoft application "Private Character Editor" (PCE), supplied with Windows: eudcedit.exe. You need to use this font in your application in a regular way.

Using PCE, you can link you Private Use Characters to some or all fonts in your font library on the system. When this is done, you can use any regular font (if it is linked to you Private font created with PCE) in any System.Windows.Forms control or WPF FrameworkElement. Importantly, you can mix Private Use Characters with regular characters in one string.

ListView lv = new ListView();
//...
lv.Items.Add(new ListViewItem(
    "Normal characters; Private use character: " +
     Convert.ToChar(0xE000)));

...或类似的东西.

...or whatever like that.


这篇关于在DataGrid或列表中显示私人字符???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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