6/29/2023 0 Comments Uwp selected text colorThis example demonstrates customizing different inline elements within a TextBlock. TextBlock.FontFamily = new FontFamily("Arial") TextBlock.Foreground = new SolidColorBrush(Windows.UI.Colors.Blue) TextBlock.SelectionHighlightColor = new SolidColorBrush(Windows.UI.Colors.Green) TextBlock.Text = "This text demonstrates some TextBlock properties." The FontWeight, FontFamily, FontStyle, Foreground color, and SelectionHighlightColor properties are customized. This example shows how to customize the appearance of a TextBlock with a single Run of text. TextBlock.TextWrapping = TextWrapping.Wrap TextBlock.Text = "This text demonstrates the wrapping behavior of a TextBlock." If using a keyboard for text selection within a TextBlock, the user must first activate Caret Browsing (with the app in the foreground, press F7). Public sealed class TextBlock : FrameworkElement Public NotInheritable Class TextBlock Public sealed class TextBlock : FrameworkElement / Ĭlass TextBlock final : FrameworkElement /// Ĭlass TextBlock final : FrameworkElement In this article public ref class TextBlock sealed : FrameworkElement /// Provides a lightweight control for displaying small amounts of text.
0 Comments
Leave a Reply. |