• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
This section includes topics that describe how to work with controls that display text. Some of these are simple controls, such as a Button.
Others are special Windows Presentation Foundation text controls that allow for input or rich text editing.
In This Section
Conceptual
Text and typography overview
How to

Add a text control to the artboard
Add an object to text flow
Edit text
Format text
Format paragraphs
Indent a line or a paragraph
Set text wrapping
Make text editable or read-only
Check spelling
Change the color of text objects
Create a bulleted or numbered list
Create a hyperlink in a Page document
Convert text to a path
Add a custom font to your application
Embed a font or a subset of a font in your application
Open the Font Manager

Try it!
Try it: Create a FlowDocumentReader control
Try it: Create a hyperlink that opens a browser window
See also
Concepts
Animate the points on a path or clipping path
Sendfeedback on this topic to Microsoft. \u00a9 2008 Microsoft Corporation. All rights reserved.
Text and typography
Text and typography overview
Page 1 of 22
Text and typography
6/16/2009
file://C:\Windows\Tem \~hh3BC9.htm
Use a text control to display text in your application. This can include text that your user can modify, text that labels parts of your
application, long passages of text with scrollbars, or text that is dynamically bound to data (see Bind data to a property or element).
Some controls are considered text controls because they display text (such as a button or check box). However, these other controls do not
allow for rich-text editing. For this reason, Microsoft Expression Blend includes a set of special text controls.
Special types of text controls
Text control

Supports
rich text,
shapes,
and
images

Editable
at
runtime

Available
in
Microsoft
Silverlight
1.0
projects

Available
in
Microsoft
Silverlight
2 projects

TextBox

Provides an editable region
that accepts text input. Use
this control when you want
users to be able to enter new
text or edit existing text in
your application. You can
specify the font of the text at
design time.

No
Yes
No
Yes
RichTextBox

Provides the same
functionality as a TextBox
object, but supports more
text formatting properties
and can contain any other
type of object, such as an
image or shape. Use this
control when you want users
to be able to enter rich text
in multiple fonts with
images and other objects.
You can copy and paste
content from most
applications, including
Microsoft Office Word and
Internet Explorer.

Yes
Yes
No
No
TextBlock

Provides a block of static
text that the users of your
application cannot edit. A
TextBlock can contain any
other type of object, such as
an image or shape. Use this
control when you must give
instructions to your users, or
to communicate information
that doesn't require editing.
Note that although text in
this kind of control cannot

Yes
No
Yes
Yes
Page 2 of 22
Text and typography
6/16/2009
file://C:\Windows\Tem \~hh3BC9.htm

be edited by users of your
application, you can change
the text through the code-
behind file. You can copy
and paste content from most
applications, including
Microsoft Office Word and
Internet Explorer.

PasswordBox

Provides basic password
functionality. Use this
control to promote privacy
in your application. When
you do this, text that a user
enters in the text control is
masked by showing bullet

point characters ( ), or
another character that you
specify in the PasswordChar
property, instead of the
characters that the user
types.

No
Yes
No
Yes
Label

Provides a block of static
content that you can use for
basic labeling of other
controls or user interface
elements. A Label can
contain text or content (such
as an image or shape) but
not both text and content at
the same time. Additionally,
this control provides
mnemonic support, which
offers functionality for
keyboard accessibility and
navigation through labeled
controls that the user can
access by pressing the ALT
key in Windows-based
applications.

No
No
No
No
FlowDocumentScrollViewer

Provides a block of static
text with a scrollbar that the
user can use to navigate
through the text. It can also
contain any other type of
object, such as an image or
shape. You can set
properties for this control
under Miscellaneous in the
Properties panel to hide or
show the vertical and
horizontal scrollbars.

Yes
No
No
No
Page 3 of 22
Text and typography
6/16/2009
file://C:\Windows\Tem \~hh3BC9.htm
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...