fixed #827
This commit is contained in:
1 parent
aded2ab4e3
commit
c9fb7a2eb5
6 files changed
+57
-49
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace HandyControl.Tools.Helper
|
||||
{
|
||||
internal class TextHelper
|
||||
{
|
||||
public static FormattedText CreateFormattedText(string text, FlowDirection flowDirection, Typeface typeface, double fontSize)
|
||||
{
|
||||
#if NET40 || NET45 || NET451 || NET452 || NET46 || NET461
|
||||
var formattedText = new FormattedText(
|
||||
text,
|
||||
CultureInfo.CurrentUICulture,
|
||||
flowDirection,
|
||||
typeface,
|
||||
fontSize, Brushes.Black);
|
||||
#else
|
||||
var formattedText = new FormattedText(
|
||||
text,
|
||||
CultureInfo.CurrentUICulture,
|
||||
flowDirection,
|
||||
typeface,
|
||||
fontSize, Brushes.Black, DpiHelper.DeviceDpiX);
|
||||
#endif
|
||||
|
||||
return formattedText;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user