Teil von  SELFPHP
Professional CronJob-Service

Suche

:: Anbieterverzeichnis ::

Globale Branchen

Informieren Sie sich über ausgewählte Unternehmen im Anbieterverzeichnis von SELFPHP  

 

:: SELFPHP Forum ::

Fragen rund um die Themen PHP?
In über 130.000 Beiträgen finden Sie sicher die passende Antwort!  

 

:: Newsletter ::

Abonnieren Sie hier den kostenlosen SELFPHP Newsletter!

Vorname: 
Name:
E-Mail:
 
 
 
Working with Text and Embedding Fonts in Expression Blend






What you’ll learn in this module:

Creating a TextBlock
Changing text Properties
Embedding FontFamilies
Using the Font Manager


Venture into Gaming Using Expression Blend: Module 8

Working with Text and Embedding Fonts in Expression Blend

Using fonts that work consistently in all systems has been an issue that has led to the use of the same built in fonts, over and over again. Now with Expression Blend 3, you can embed fonts, opening up the opportunities for a more creative layout.

TextBlock vs. TextBox
Before jumping into this module, it is a good idea to understand the differences between a TextBlock and a TextBox. In the game example, a TextBlock contains text that is part of the look and feel of the game. TextBoxes, on the other hand, are used to create text area where text can be input by the user.

Working with TextBlocks
In the beehive game (inside of the module08_assets folder), there is a need for text to indicate information such as score, hi-score, lives and more. In this section you find out how to create these TextBlocks, change the font, to a font not included with Silverlight, and then how to embed your font into your project.

  1. Choose File > Open Project/Solution. Browse to the module08_assets folder and open up the beehive folder. Locate the Expression Blend file and double-click to open it. If necessary, right-click the beehive project and choose Open With Expression Blend 3.
    You will now create the TextBlocks needed to notify the user of their lives and score.
  2. Click the TextBlock tool in the Tools panel. Click and drag a TextBlock in the upper left-hand corner of the project window.




    Before you begin typing, locate the Properties panel and makes some changes to the properties of the text.
  3. In the Properties panel, choose White for the Foreground color in the Brushes pane.
  4. In the Text pane of the Properties panel, click and hold the FontFamily drop-down menu.
    Note that many of the fonts have a symbol to the right of the FontFamily name (
    ) indicating that these fonts are already available to anyone who already has Silverlight and can be safely used. By safe, this means that you can expect that the user will see the same font family that you have indicated in Expression Blend.



    The symbol to the right indicated built in FontFamilies.

    This listed of available fonts can leave much to be desired. Perhaps you are the designer, or you are working with one that wants to be a little more creative.



    More Unique FontFamily selections are available in Expression Blend 3.
  5. Now select a FontFamily from the FontFamily drop-down list. In our example, we selected Eurostile LT Std2, but you can chose any font you would like from your FontFamily list.
  6. Change the font size to 18 pt in the FontSize drop-down menu.




  7. Now type SCORE into the TextBlock. The text appears in the FontFamily that you selected, but if you were to press f5 right now, the font would not carry through to the browser. There is a simple step you must take in order for this to appear correctly.
  8. In Expression Blend, check the Embed checkbox directly underneath the FontFamily drop-down menu.
  9. Click the Projects panel and notice that a folder named Fonts in now added to your project. This folder contains your font family.




  10. Create 3 more TextBlocks across the top of your artboard, each containing the text LAST, HI-SCORE, and LIVES in that order. If necessary, select the TextBlocks when you are finished and use Object > Align to make sure they are aligned correctly.


Seite 1 von 2 1 2



Downloads

Copyright © 2010
Microsoft Deutschland GmbH
Alle Rechte vorbehalten.

 Microsoft Deutschland GmbH
 




:: Premium-Partner ::

Webhosting/Serverlösungen

Pixel X weitere Premium-Partner
 

:: SELFPHP Sponsor ::

Kaspersky Labs GmbH weitere Sponsoren
 


:: Buchempfehlung ::

Fortgeschrittene CSS-Techniken

Fortgeschrittene CSS-Techniken zur Buchempfehlung
 

:: Anbieterverzeichnis ::

Webhosting/Serverlösungen

Suchen Sie den für Sie passenden IT-Dienstleister für Ihr Webhosting-Paket oder Ihre Serverlösung?

Sie sind nur ein paar Klicks davon entfernt!


 

Ausgewählter Tipp im Bereich PHP-Skripte


Mehrfaches Absenden eines Formulars verhindern

Weitere interessante Beispiele aus dem SELFPHP Kochbuch finden Sie im Bereich PHP-Skripte
 

SELFPHP Code Snippet


Suchen und Ersetzen in einer Tabellenspalte

Weitere interessante Code Snippets finden Sie auf SELFPHP im Bereich PHP Code Snippets
 
© 2001-2024 E-Mail SELFPHP OHG, info@selfphp.deImpressumKontakt