How to set the 'FontColor' of the TextBlock to anything other than black or white?

Hi Guys,

The Glide TextBlock property FontColor is of type ‘Microsoft.SPOT.Presentation.Media.Color’ which is black or white

Yet the Canvas color can be assigned using Glide.Colors (a decent size pallete of real colors)

is there a way to use anything other than black/white?

I see on the http://www.ghielectronics.com/glide/designer/ designer its a hard coded number
without any hint as to what numbers are valid

Any guidance welcome.

related topics:
http://www.tinyclr.com/forum/22/3957/

In Glide Designer colors are hex values. These are converted to a Color when loaded. Glide.Colors is simply a class that contains Microsoft.SPOT.Presentation.Media.Color constants such as:

public static readonly Color Fuchsia = ColorUtility.ColorFromRGB(255, 0, 255);

Therefore it can be used on the TextBlock’s FontColor property.

myText.FontColor = Glide.Colors.Fuchsia;

Hi Josh,

I’m not able to implement your second line of code:


public static readonly Color MyCustomColor = ColorUtility.ColorFromRGB(255, 0, 255);
...
myText.FontColor = Glide.Colors.MyCustomColor;

Glide.Colors is not an available option in Intellisense.

Build Error
’GHIElectronics.NETMF.Glide.Glide’ does not contain a definition for ‘Colors’

Remove Glide.Colors, just like this ;D:


myText.FontColor = MyCustomColor;

Thanks Dat