KimicušŸ”„
KimicušŸ”„
CC#
Created by KimicušŸ”„ on 2/18/2024 in #help
WPF Fonts
Hi, I can't add my font to the WPF app. That's what I did.: 1) Added ".ttf" fonts to the project 2) Made them a "Resource" 3) wrote in App.xaml:
<Style x:Key="KodeMono-Bold" TargetType="Control">
<Setter Property="FontFamily" Value="/KimicuHelper;component/Resources/Sources/Fonts/KodeMono-Bold.ttf#KodeMono-Bold" />
</Style>
<Style x:Key="KodeMono-Bold" TargetType="Control">
<Setter Property="FontFamily" Value="/KimicuHelper;component/Resources/Sources/Fonts/KodeMono-Bold.ttf#KodeMono-Bold" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="FontFamily" Value="{StaticResource KodeMono-Bold}" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="FontFamily" Value="{StaticResource KodeMono-Bold}" />
</Style>
1 replies