![]() ![]() Use the LineStackingStrategy property to determine how a line box isĬreated for each line. The first TextBlock has a LineStackingStrategy value of MaxHeight,the second TextBlock has a value of BlockLineHeight, and the third TextBlock has a value of BaselineToBaseline. The following example shows how to use the LineStackingStrategy property to determine how the line boxes are created for text lines of a TextBlock. ![]() This is the visible text of the hyperlink. The Run is used as the visible content of the hyperlink. Create a TextBlock this is needed to put the hyperlink inside This example shows how to use an inline hyperlink. Run2.Foreground = new SolidColorBrush(Windows.UI.Colors.Red) Run.Foreground = new SolidColorBrush(Windows.UI.Colors.Blue) For Run and Span, add 'using Windows.UI.Xaml.Documents ' ![]() This 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |