当前位置:网站首页>WPF 测量字符串显示大小
WPF 测量字符串显示大小
2022-06-29 20:37:00 【小小的熊OnlyOne】
private Size MeasureString()
{
var formattedText = new FormattedText(
this.myabc.Text,
CultureInfo.CurrentCulture,
FlowDirection.LeftToRight,
new Typeface(this.myabc.FontFamily, this.myabc.FontStyle, this.myabc.FontWeight, this.myabc.FontStretch),
this.myabc.FontSize,
Brushes.Black,
new NumberSubstitution(),
TextFormattingMode.Ideal);
formattedText.TextAlignment = TextAlignment.Right;
return new Size(formattedText.Width, formattedText.Height);
}
边栏推荐
- Community interview -- jumpserver open source fortress in the eyes of an it newcomer
- Wangedit rich text editor usage (detailed)
- Jupyter service installation and startup
- Cmake development - Multi Directory Project
- 60天远程办公经验分享 | 社区征文
- 分析影响导电滑环传输信号的因素
- Golang基础学习
- Xiaomi written test real question 1
- Flume-ng配置
- How to use the configuration in thinkphp5
猜你喜欢

「运维有小邓」Active Directory 密码过期通知功能

Flume configuration 1 - basic case
![[notes] take notes again -- learn by doing Verilog HDL – 014](/img/92/ba794253f1588ff9ad87d2571a453e.png)
[notes] take notes again -- learn by doing Verilog HDL – 014

Coreldraw2022 new version v24.1.0.360 update

Three.js开发:粗线的画法

「运维有小邓」日志分析工具使用越来越频繁的原因

Comparable comparator writing & ClassCastException class conversion exception

Jmeter之BeanShell详解和夸线程调用
![[notes] take notes again -- learn by doing Verilog HDL – 008](/img/7f/0ca73446247455ac4d8f9667083a87.png)
[notes] take notes again -- learn by doing Verilog HDL – 008

How do I audit Active Directory User account changes?
随机推荐
liunx指令
Bigder:自动化测试工程师
利用积分商城游戏进行营销需要避免哪些问题出现?
[a must for reptiles - > scrapy framework from black iron to king] first chapter - detailed explanation of 10000 character blog posts (recommended Collection)
Win7 Easy Connect prompt: route selection connection failed. The current connection network may be abnormal. Please try again later
Flume configuration 1 - basic case
日本樱桃一颗拍出1980元天价,网友:吃了有上当的感觉
mapbox-gl开发教程(十二):加载面图层数据
「运维有小邓」审核并分析文件和文件夹访问权限
Go: how to write a correct UDP server
Startservice() procedure
VoIP Push 在海外音视频业务中的应用
Win7 easy connect 提示:选路连接失败,可能当前连接网络异常,请稍后重试
Comparable比较器写法&ClassCastExcption类转换异常
【Try to Hack】vulnhub narak
Information system project manager -- Chapter VII examination questions of project cost management over the years
High energy live broadcast, a gathering of celebrities! We invite you to explore bizdevops.
At least 3 years for learning amplifier?
"Xiaodeng" active directory batch user creation in operation and maintenance
Flume-ng配置