简体   繁体   English

如何将wpf组合框绑定到所有系统字体大小

[英]how to bind wpf combo box to all system font size

Is there any easy way (or no so easy ) 有没有简单的方法(或没有那么容易)
to bind wpf combo box to all system font size? 将wpf组合框绑定到所有系统字体大小? I would like to do this in the xaml.cs file rather than the straight XAML. 我想在xaml.cs文件中而不是直接的XAML中执行此操作。

There is really no such a thing as System Font Sizes. 实际上没有System Font Sizes这样的东西。 The size could be anything. 尺寸可以是任何东西。 If you want to use system fonts you could go through those like that: 如果你想使用系统字体,你可以通过这样的方式:

foreach (FontFamily F in Fonts.SystemFontFamilies) addToComboBox(F);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM