WPF学习笔记:给文字添加线性渐变效果

阅读 20

2024-06-01

<TextBox Text="XXX信息管理系统" VerticalAlignment="Center" Background="Transparent"
         HorizontalAlignment="Center" FontSize="35" FontWeight="Normal">
    <TextBox.Effect>
        <DropShadowEffect BlurRadius="5" Color="Black" ShadowDepth="0" Opacity="0.5"/>
    </TextBox.Effect>
    <TextBlock.Foreground>
        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <GradientStop Color="Gold" Offset="0"/>
            <GradientStop Color="Orange" Offset="1"/>
        </LinearGradientBrush>

    </TextBlock.Foreground>
</TextBox>

精彩评论(0)

0 0 举报