[WPF]The differences between Text Box and Text Block in Blend
2010-02-07 19:15
519 查看
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.
统一性强,强调输入和改变性
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.
统一性强,强调输入和改变性
相关文章推荐
- OpenStack: What is the difference between Block storage and Object storage?Also, In what way they ar
- What Is the Difference Between a Block, a Proc, and a Lambda in Ruby
- 我也谈“the difference between Factory, Service, and Provider in Angular”
- What are the practical differences between SVD and wavelet transforms in data analysis?
- difference between count(*) and count(col) in the query
- Difference between List View and DataGrid in WPF
- What's the difference between Future and FutureTask in Java?
- The difference between Web role and Worker role in windows azure platform
- The difference between text mode and binary mode with file streams
- the differences between DataGrid and DataList in HTML View
- the difference between LAR, and the Bisquare Remain Robust in regression —Curve Fitting Tool
- What is the difference between SVD and matrix factorization in context of recommendation engine?
- The differences between pointer and reference in C++
- In C++, what’s the difference between an inline function and a macro?
- what is the difference between definition and declaration in c
- what is the difference between definition and declaration in c
- The difference between BEB in MACA and in MACAW
- What is the Difference Between Type and Class in
- what the difference between __weak and __block reference?
- What is the difference between a soft reference and a weak reference in Java?