我只是想知道是否可以将可用的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.FontWeights和System.Windows.FontStyles类进行反思,还是会有更简单的方法?
谢谢