It is the perfect element for displaying instructions or summary information."
- Quoted from ''Sams Teach Yourself WPF in 24 Hours"
Usage example
I have a program that users can communicate with each other. I wish to add the feature of bold, colored, line-breaking and icons to that chat.
Here is an example I've found to illustrate it:
Example
Code Snippet
- <TextBlock FontSize="10" TextWrapping="Wrap" >
- <Image Stretch="UniformToFill" Width="32" Height="32" Source="http://upload.wikimedia.org/wikipedia/en/b/b0/Avatar-Teaser-Poster.jpg" Margin="2 2 2 2" />
- <Bold><Italic FontSize="12" Foreground="DarkGreen">ShloEmi:</Italic></Bold><LineBreak />
- <Bold><Italic FontSize="14" Foreground="BlueViolet">H</Italic></Bold>ave fun with <Bold>TextBlock's</Bold>.<LineBreak />
- <AccessText Foreground="Blue">It's easy when you have an example </AccessText> <Image Source="http://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Smiley.svg/50px-Smiley.svg.png" Width="16" Height="16"></Image>
- </TextBlock>
Result
Have fun...
No comments:
Post a Comment