ser*_*hio 6 .net wpf fonts font-size winforms
我需要在WPF"字体"中转换GDI字体.
myGdiFont As System.Drawing.Font
Run Code Online (Sandbox Code Playgroud)
在
_Family As Windows.Media.FontFamily
_Style As Windows.FontStyle
_Weight As Windows.FontWeight
_Size As Double
Run Code Online (Sandbox Code Playgroud)
特别是,我需要转换
_Size = myGdiFont.Size (???)
Run Code Online (Sandbox Code Playgroud)
WinForms字体的大小是单位或点...在WPF中是像素...如何从一个转换为另一个?
PS.
掌握克莱门斯的迹象,这是正确的吗?
Dim myDrawingFont As New System.Drawing.Font("Arial", 10)
Dim myWpfLabel As New Windows.Controls.Label
myWpfLabel.FontSize = myDrawingFont.SizeInPoints * 72 / 96
Run Code Online (Sandbox Code Playgroud)
固定:
myWpfLabel.FontSize = myDrawingFont.SizeInPoints * 96 / 72
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3526 次 |
最近记录: |