Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

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

Thanks.

Andy
Posted
Comments
Dave Kreskowiak 27-Dec-10 1:01am    
What do you mean by "Private Characters"?
Sergey Alexandrovich Kryukov 27-Dec-10 1:03am    
System.Windows.Forms or WPF?

What do you call "Private Characters"? I don't think I ever heard of those.
There are so-called "private use characters" in Unicode (in Private Use Areas (PUA)). Do you need those?

1 solution

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.

C#
ListView lv = new ListView();
//...
lv.Items.Add(new ListViewItem(
    "Normal characters; Private use character: " +
     Convert.ToChar(0xE000)));
...or whatever like that.
 
Share this answer
 
v3
Comments
jerrykid 27-Dec-10 2:50am    
Hi SAKryukov,

Yes, I mention on Private Character Editor tool. But I don't want to use this tool to display Private Characters or Character Map to copy characters and paste to document.

The things I want to do is how to get the Characters which design by Private Character Editor tool to display on a DataGrid or List (by coding). That's all.

Thanks,

Andy
Sergey Alexandrovich Kryukov 27-Dec-10 8:03am    
What document or Character Map? No document.
I just tried it: you use PCE edit and save characters using File / Font Links, link some fonts or all of them. That will require saving file. Than you use on of the fonts use specified when you linked in any application -- it's working.
Sergey Alexandrovich Kryukov 27-Dec-10 8:16am    
Andy, after I tried I improved this answer. This is really simple.

Yes, there is a some help on PCE talking mostly about Character Map and inserting Private Use Character in the document -- this can be confusing. You need to follow my instructions -- please try and ask me if you have any problems.
jerrykid 27-Dec-10 20:58pm    
Thanks for your replying,

I think that I've found out the solution when you write some codes.

Andy.
Sergey Alexandrovich Kryukov 27-Dec-10 22:58pm    
Andy, thank you for accepting my answer.

Would you also consider voting (if you haven't done so, I don't know)?
Sorry I cannot answer your next question (my 5, but... -- see my comment and question).

Good luck and best wishes in New Year!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900