سلام بر تمامی برنامه نویسان #C 😉 در این مطلب کد برجسته کردن (Emboss) متن با TextBlock با wpf و سی شارپ را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
تصاویر خروجی نهایی این کد:
کد برجسته کردن (Emboss) متن با TextBlock با wpf و سی شارپ :
<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="FontFamily" Value="Times New Roman" />
<Setter Property="FontSize" Value="144" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Foreground="{DynamicResource
{x:Static SystemColors.GrayTextBrushKey}}">
Emboss
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="FontFamily" Value="Times New Roman" />
<Setter Property="FontSize" Value="144" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Foreground="{DynamicResource
{x:Static SystemColors.GrayTextBrushKey}}">
Emboss