Geeks With Blogs
Silverlighting... Ramblings on Silverlight and occasionally WPF

The <LineBreak></LineBreak> tags allow you to insert line breaks at desired location of content inside a TextBlock.

Consider the following example,

<UserControl x:Class="Demo.MainPage"
    xmlns:d="" xmlns:mc=""
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
  <Grid x:Name="LayoutRoot" >
<TextBlock>The function of the DescriptionViewer
 <LineBreak></LineBreak>control in
  Silverlight is to display some
 <LineBreak></LineBreak>information as a description and
 <LineBreak></LineBreak>track error state for an associated

To see how the LineBreak tags work, also test the above code without the LineBreak tags. Then you will understand the difference.

Posted on Sunday, July 4, 2010 9:47 AM Silverlight | Back to top

Comments on this post: How to use line breaks in TextBlock controls

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Mamta | Powered by: