Change Label FontFamily in code behind WPF Basic

Sebastian Martinez Santos 21 Reputation points
2022-12-27T21:11:41.367+00:00

Hi, I just want to know how to change a WPF label FontFamily in code-behind, since I have seen a lot of examples in C# but not In Basic. Thank you!

PS: I can't understand why these things were so much simpler in Windows Forms, and basic things like this are so hard to do in WPF.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,457 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,276 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 101.3K Reputation points
    2022-12-27T21:32:04.577+00:00

    This seems to work: label1.FontFamily = New FontFamily("Papyrus").

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful