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

<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>
上一篇:C++实现,简单的命令行交互框架