小编Hae*_*bin的帖子

将FontStyles和FontWeights绑定到WPF ComboBox

我只是想知道是否可以将可用的FontStyles和FontWeights 列表绑定到一个ComboBox

例如,要将字体列表绑定到组合框,您可以使用:

FontComboBox.ItemsSource = Fonts.SystemFontFamilies;
Run Code Online (Sandbox Code Playgroud)

我还可以为:

FontStyleComboBox.ItemsSource = .... 
FontWeightComboBox.ItemsSource = ....  ?
Run Code Online (Sandbox Code Playgroud)

是否需要对类System.Windows.FontWeightsSystem.Windows.FontStyles类进行反思,还是会有更简单的方法?

谢谢

.net wpf binding combobox styles

8
推荐指数
1
解决办法
7108
查看次数

标签 统计

.net ×1

binding ×1

combobox ×1

styles ×1

wpf ×1