October 20th, 2009
The differences between Text Box and Text Block in Blend
Silverlight Blend Tutorials, Working with Silverlight, by Gavin Wignall.This post is part of a string of posts found here: Learn Blend in a Month.
Both TextBlocks and TextBoxes can be used to display text, they can be set to specific Height and Width or be set to Auto so that they grow in size with the text. They can both set font size, font type, font styling, to wrap and to range left, right or centred. Both TextBlocks and TextBoxes can have opacity set and have Pixel Shaders applied. Although at first the TextBlock and TextBox look like they do very similar things, they do actually have very different functions.
The TextBlock
TextBlocks are used for displaying text more focused typographically. TextBlocks can contain text set to different colors, fonts and sizes. The line height can also be increased from the default setting to give more space between each line of text. Text inside a TextBlock can not be made selectable by the user.
The TextBox
TextBoxes are used for displaying text more focused for content input or when content is needed to be made selectable by the user. The TextBox can only be set to one colour, one font size, one font type etc. TextBoxes also have fixed Line Spacing. The TextBox can also be set to a fixed height and width but also have scrollbars switched on to allow content to expand.
[...] This post was mentioned on Twitter by Silverlight News, R Pooran Prasad. R Pooran Prasad said: RT @SilverlightNews: The differences between Text Box and Text Block in Blend – http://snurl.com/slu8t [...]
[...] The differences between Text Box and Text Block in Blend [...]
Social comments and analytics for this post…
This post was mentioned on Twitter by SilverlightNews: The differences between Text Box and Text Block in Blend – http://snurl.com/slu8t...