There are many ways you can get user input in your app. You typically save text entered into a RichEditBox to a. Rather, you use it to work with text files that are separate from your app. You don't use a RichEditBox to get user input into your app the way you use other standard text input boxes. Use a RichEditBox to display and edit text files. You should also use an AutoSuggestBox control to implement a search box. Suggested terms can draw from a combination of popular search terms and historical user-entered terms. An auto-suggest box is a text entry box that triggers a list of basic search suggestions. Use an AutoSuggestBox control to show the user a list of suggestions to choose from as they type. A password box looks like a text input box, except that it renders bullets in place of the text that has been entered. A password box is a text input box that conceals the characters typed in it for the sake of privacy. Use a PasswordBox control to collect a password or other private data, such as a Social Security number. If the text is never editable, consider using a TextBlock instead. You can make a TextBox read-only, but this should be a temporary, conditional state. You can use the Text property to get and set the text in a TextBox. Use a TextBox control to let a user enter and edit unformatted text, such as in a form. It doesn't have a Text property that you can use to easily access the control's text content in your app. The content property of RichTextBlock is the Blocks property, which supports paragraph based text via the Paragraph element. RichTextBlock provides several features for advanced text layout. Use a RichTextBlock when you need support for multiple paragraphs, multi-column text or other complex text layouts, or inline UI elements like images. Although you can put line breaks in the text, TextBlock is designed to display a single paragraph and doesn't support text indentation. It also provides many of the same formatting options for customizing how your text is rendered. You can easily access and use text from a TextBlock in your app by getting the value of the Text property. TextBlock is typically easier to use and provides better text rendering performance than RichTextBlock, so it's preferred for most app UI text. You can use it to display single-line or multi-line text, inline hyperlinks, and text with formatting like bold, italic, or underlined. Use a TextBlock to display most read-only text in your app. Use this info to pick the right text control to use in your app. The text control you use depends on your scenario. Important APIs: TextBlock class, RichTextBlock class, TextBox class, RichEditBox class, AutoSuggestBox class, PasswordBox class Is this the right control? The controls for text entry and editing are: TextBox, RichEditBox, AutoSuggestBox, and PasswordBox.The controls for displaying read-only text are TextBlock and RichTextBlock.The XAML framework provides several controls for rendering, entering, and editing text, and a set of properties for formatting the text. Text controls consist of text input boxes, password boxes, auto-suggest boxes, and text blocks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |