var formattedText = new FormattedText(
Txbox.Text,
CultureInfo.CurrentUICulture,
FlowDirection.LeftToRight,
new Typeface(Txbox.FontFamily, Txbox.FontStyle, Txbox.FontWeight, Txbox.FontStretch),
Txbox.FontSize,
Brushes.Black);
Size size = new Size(formattedText.Width, formattedText.Height);WPF 获取文本像素长度
最新推荐文章于 2025-05-03 01:13:54 发布
4万+

被折叠的 条评论
为什么被折叠?



