gpt4 book ai didi

wpf - 如何在wpf中对TextBlock应用投影、内阴影、渐变叠加效果

转载 作者:行者123 更新时间:2023-12-02 04:26:53 24 4
gpt4 key购买 nike

我对我的 PSD 有以下影响:-

==============阴影=============

-混合模式:-相乘

-颜色:-黑色

-不透明度:- 50%

-天使:- 90

========内阴影================

-混合模式:-正常

-颜色:-白色

-不透明度:- 62%

-天使:- 120

=======渐变叠加===============

-混合模式:-正常

-不透明度:- 100%

-天使:- 90

-起始颜色:- #8a8a8a

-结束颜色:-#ffffff

以下是psd的图片 enter image description here

如何应用到 Textblack 我已经应用了以下代码:-

<TextBlock x:Name="lblTitle" Margin="5" Foreground="#FFFFFFFF" FontWeight="Bold" FontSize="20" FontFamily="Arial Bold"
TextOptions.TextFormattingMode="Display" TextAlignment="Left" TextWrapping="Wrap" Text="Tournament: $3 + $0.30 KO Sit and Go">
<TextBlock.Effect>
<DropShadowEffect Color="Black" Opacity="50" Direction="-90" RenderingBias="Quality" ShadowDepth="2" >

</DropShadowEffect>
</TextBlock.Effect>
</TextBlock>

最佳答案

Hi we can add the  Inner Shadow as follows

<Grid Height="100" Width="600" Margin="100,100,100,100">
<Border Background="LightGray" BorderBrush="DarkGray"
BorderThickness="1" ClipToBounds="True">
<Border Background="Transparent" BorderBrush="Black"
BorderThickness="1" Margin="-2">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="10">
</DropShadowEffect>
</Border.Effect>

<TextBlock x:Name="lblTitle" Margin="5" Foreground="#FFFFFFFF" FontWeight="Bold" FontSize="20" FontFamily="Arial Bold"
TextOptions.TextFormattingMode="Display" TextAlignment="Left" TextWrapping="Wrap" Text="Tournament: $3 + $0.30 KO Sit and Go">
<TextBlock.Effect>
<DropShadowEffect Color="Black" Opacity="50" Direction="-90" RenderingBias="Quality" ShadowDepth="2" >

</DropShadowEffect>

</TextBlock.Effect>

</TextBlock>
</Border>
</Border>

</Grid>

关于wpf - 如何在wpf中对TextBlock应用投影、内阴影、渐变叠加效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19419691/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com