Friday, December 18, 2009

New features in Silverlight 4 Beta: RichTextArea Control, Right to Left Flow Direction & Text Trimming

Have you checked out the new cool RichTextArea control or TextBlock with trimming ? Read this post.

The RichTextArea allows hyperlinks, XAML content, and embedding of images. It supports changing the font size, foreground color, and making text bold, italicized, and underlined.  Paragraph blocks allow different formatting of blocks of text. Mouse events, clipboard, undo, language localization are also supported.

richtextarea_1

Some limitations

  • UI elements and hyperlinks are active only in read-only mode.
  • You can cut, copy, or paste only plain text.
  • Undo is supported only if the IsReadOnly property is false.

richtextarea_3

You can now set the direction of content and layout of each control to flow from right side to the left (which is useful for some languages such as Hebrew or Arabic). All UIElement controls inherit the FlowDirection from their parent except Image, MediaElement, MultiScaleImage and Popup. When brushes and effects are applied to elements whose FlowDirection property is set RightToLeft, the result is flipped horizontally.

richtextarea_4

The TextBlock has a new TextTrimming property. When this property is set to WordEllipsis and the text in the TextBlock exceeds the visible limit, the text appears truncated with a trailing three ellipsis.

texttrimming_12

Other text improvements

  • Arabic and Hebrew Text Support
  • IME (Input Method Editors) improvements for TextBox
  • UIElement: TextInputStart, TextInputUpdate, TextInput events

Useful links: 

No comments: