Does Silverlight have a System.Console class? Why?

Does Silverlight have a System.Console class? Why?

Yes. Silverlight have System.Console class. It is cocooned in the SecurityCritical attribute. It is so for using for internal uses and making it useless for remote usage.

Is it possible to load external OTF or TTF in Silverlight? How

It is possible to load external OTF or TTF in Silverlight. The process is:

- Right click on Silverlight application project folder. Select “Add->New Item…”.

- Browse and select the font and click on OK buton

- Select the font and set the grid property Build Action = “Resource”, and “Copy to Output Directory” = “Copy if newer”:

- Use the following syntax in the FontFamily attribute of XAML file
FontFamily=”[FontFileName]#[FontFriendlyName]”

Example:
<TextBlock Text="Hello" FontFamily="Century.ttf#Century"></TextBlock>

- To find the exact font name, double click on the font to open the font viewer.
Silverlight control properties
The properties ‘source’ and ‘elementID’ are to be initialized. The ‘source’ attribute can be a ‘.xaml’ file or an ‘.aspx’ file...
Path instructions in XAML - Silverlight
Path instructions in XAML - The Path instruction of XAML allows to draw and fill a path. Various points in the path represents are represented by the Data attribute. The attribute includes M which means to move to command...
Resemblance between CSS and Silverlight
Silverlight content is hosted on the tag. CSS of DIV can be changed as it is for other HTML documents. The changes can be for absolute positioning, z-indexing, top and left properties etc...
Post your comment