首页 > 其他分享 >WPF Textblock Run glyphFontSize TextDecorations

WPF Textblock Run glyphFontSize TextDecorations

时间:2024-09-25 09:47:33浏览次数:1  
标签:Run TextBlock Textblock WPF TextDecorations glyphFontSize

<Window x:Class="WpfApp412.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp412"
        mc:Ignorable="d"
        WindowState="Maximized"
        Title="MainWindow" Height="450" Width="800">
    <Window.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="FontSize" Value="100"/>
        </Style>
    </Window.Resources>
    <StackPanel>
        <TextBlock>
            <Run FontStyle="Italic" FontFamily="Georgia" Foreground="Red">
                Rich
            </Run>
        </TextBlock>
        <TextBlock>
            
        <Run FontSize="30" FontFamily="Comic Sans MS" Foreground="Blue">Text</Run>
        </TextBlock>
        <TextBlock>            
        <Run FontFamily="Arial Black" Foreground="Orange" FontSize="100">in</Run>
        </TextBlock>
        <TextBlock>            
        <Run FontFamily="Courier New" FontWeight="Bold" Foreground="Green"> a</Run>
        </TextBlock>
        <TextBlock>
            <Run FontFamily="Verdana" TextDecorations="Underline">TextBlock</Run>
        </TextBlock>
    </StackPanel>
</Window>

 

 

 

 

 

 

 

标签:Run,TextBlock,Textblock,WPF,TextDecorations,glyphFontSize
From: https://www.cnblogs.com/Fred1987/p/18430672

相关文章

  • WPF Image show picture in high resolution periodically via System.Timers.Timer
    <Windowx:Class="WpfApp411.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft......
  • 为什么会出现vcruntime140_1.dll丢失?无需重装系统,这里有vcruntime140_1.dll丢失最全修
    为什么会出现vcruntime140_1.dll丢失?vcruntime140_1.dll是MicrosoftVisualC++RedistributablePackage的一部分,它是许多Windows应用程序正常运行所必需的。当计算机出现vcruntime140_1.dll丢失的问题时,通常是由以下几个原因造成的:安装问题:安装不完整或损坏:某些应用程......
  • WPF Image automatically display image via System.Timers.Timer ,pause and resume,
    <Windowx:Class="WpfApp408.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft......
  • WPF window fill the full screen and overlap on the taskbar
    WindowState="Maximized"WindowStyle="None"   <Windowx:Class="WpfApp409.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsof......
  • WPF Calendar and DatePicker
    <Windowx:Class="WpfApp407.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft......
  • WPF StatusBar update periodically via System.Timers.Timer
    //xaml<Windowx:Class="WpfApp406.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......
  • 进程已结束,退出代码为 -1073740791 (0xC0000409)。QThread: Destroyed while thread i
            在使用pycharm写代码发现代码运行不了,进程已结束,退出代码为-1073740791(0xC0000409),但是又不提示具体错在哪。为了得到更加清晰的错误原因,可如下操作:        ①点击debug旁边的三个小点moreactions,点击编辑。        ②勾选在控制台中......
  • ubuntu网口状态:DOWN、UP、RUNNING
    对Ubuntu系统中网口不同状态的理解一、ipaipa可查看所有网口状态二、ifconfigifconfig可查看被up起来的网口信息三、DOWN、UP、RUNNING当网口状态为DOWN时可用ifconfigens33up将网口up网口状态必须为UP才能设置IP、子网掩码等这个接口被标记为UP(已启用)、BR......
  • ONNX模型部署利器ONNXRUNTIME框架
    1.ONNXRUNTIME介绍        ONNX格式模型部署兼容性最强的框架ONNXRUNTIME,基本上不会有算子不支持跟不兼容的情况出现,只要能导出ONNX格式模型,它基本上都能成功加载,成功推理。虽然在CPU速度不及OpenVINO、GPU上速度不及TensorRT,但是胜在兼容性强,支持不同硬件上推理部署......
  • WPF Control+C short cuts to close the window
    //xaml<Windowx:Class="WpfApp402.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......