Home > Net >  WPF use. The vera.ttf font file
WPF use. The vera.ttf font file

Time:11-18

Because the class library to make it, can not directly use the relative path from the xaml to give fontfamily assignment, put. The vera.ttf in the resx embedded resources, taking out but don't know how to use, all methods are tried on the net, use pack://application guide, xaml and xaml. Cs led all not line, hope to have who can help me with, thank you

CodePudding user response:

Not exist resx, packaged into a DLL, in the form of the Resource file attributes in the generation of operation to choose the Resource

CodePudding user response:

reference 1/f, oh wow response:
is not exist resx, packaged into a DLL, in the form of the Resource file attributes in the generation of operation to choose the Resource
what do you mean I'm in the project file attributes directly added to not so I can take to byte [] but I don't know how to give familyfont assignment

CodePudding user response:

Bosses help children

CodePudding user response:

Font files with the average cs, in the project directory

Font file into the project, set properties file

Finally, reference the font
  •  Tags:  
  • C#
  • Related