using System.Windows;
using System.Windows.Media;

namespace WPF控件;

/// <summary>
///     Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        Cmd.Background = new SolidColorBrush(SystemColors.ControlColor);

        // 简写形式
        Cmd.Background = SystemColors.ControlBrush;

        // 设置字体颜色
        Cmd.Foreground = new SolidColorBrush(Color.FromRgb(0, 255, 0));

        foreach (var fontFamily in Fonts.SystemFontFamilies) ListBox.Items.Add(fontFamily.Source);
    }
}