Text Drop Shadow : TextBlock Style « Windows Presentation Foundation « C# / CSharp Tutorial






<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="Text" Value="Drop-Shadow" />
            <Setter Property="FontFamily" Value="Times New Roman Bold" />
            <Setter Property="FontSize" Value="96" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
    </Grid.Resources>
    <TextBlock Opacity="0.5" RenderTransform="1 0 0 1 5 5" />
    <TextBlock />
</Grid>
WPF Text Drop Shadow








24.8.TextBlock Style
24.8.1.Emboss TextEmboss Text
24.8.2.Engrave TextEngrave Text
24.8.3.Text Drop ShadowText Drop Shadow
24.8.4.Empirical Tilted Text ShadowEmpirical Tilted Text Shadow
24.8.5.Fill the overline decoration with a linear gradient brush in C#Fill the overline decoration with a linear gradient brush in C#
24.8.6.Fill the baseline decoration with a linear gradient brush in C#Fill the baseline decoration with a linear gradient brush in C#
24.8.7.Fill the underline decoration with a solid color brush in C#Fill the underline decoration with a solid color brush in C#
24.8.8.Fill the strikethrough decoration with a solid color brush in C#Fill the strikethrough decoration with a solid color brush in C#
24.8.9.Simple underline decorationSimple underline decoration
24.8.10.Use Run the mark underlink TextDecorationsUse Run the mark underlink TextDecorations
24.8.11.Format Text by changing the font size
24.8.12.Change font to Italic
24.8.13.Changing font to bold
24.8.14.Combine bold and italic style
24.8.15.Wrap the text