KIT

Apr 1, 2010 at 11:28 AM

Hello,

Thanks a lot for the great silverlight control.

It help me a lot to create a program that let user change property on the fly.

However, I would like to change the font inside edit field of your control. How can I change it?

I have to display non-english.

 

Do I have to modify your code and recompile? Or using style?

Your suggestion would be appriciated.

 

Thanks,

KIT

Coordinator
Apr 2, 2010 at 1:57 PM
Edited Apr 2, 2010 at 1:57 PM

Hello, glad to hear you like the control.

The PropertyGrid control is NOT localizable. And to accomplish this would be a bit of challenge. You would have to localize the text prior to populating the control. This would require a refactoring effort and recompile.

Here is a link from MSDN about globalization and Localizing Silverlight-based Applications.

http://msdn.microsoft.com/en-us/library/cc853414(VS.95).aspx

http://msdn.microsoft.com/en-us/library/cc838238(VS.95).aspx

 

Apr 3, 2010 at 12:46 AM

Hi Hyspdrt,

 

Base on your code, I search for every "new TextBox" (found 3) and give it a specific font as below (Red color)

txt = new TextBox();
txt.FontFamily = new FontFamily("Tahoma");
txt.Height = 20;
txt.BorderThickness = new Thickness(0); 

This would work very well for my requirement for now. (my machine has this font already)

However, to get it work on any machine. I think  I will have to work more on embedded font.

 

Seems  that your suggestion can change default font of the application. Am I right?

I will study it. Thanks a lot for your kindness.

 

KIT

Coordinator
Apr 3, 2010 at 2:51 PM

As far as Fonts, yes you can embed fonts in your package, and then load whichever is desired. Assuming the Font you want is not already available. But I'm not sure changing the font will deal with your desire to localize the text. I have not done any localization before, so I'm not sure the best course of action for you.

Sorry for not being able to provide a better solution.