定时任务 Wpf.Quartz.Demo.1已经能运行了,本节开始用wpf搭界面。

准备工作:

1.界面选择MahApp.Metro

在App.xaml添加资源

 <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary>
                    <System:Double x:Key="WindowTitleFontSize">12</System:Double>
                    <System:Double x:Key="NormalFontSize">12</System:Double>
                    <System:Double x:Key="ContentFontSize">12</System:Double>
                    <System:Double x:Key="FlatButtonFontSize">12</System:Double>
                    <System:Double x:Key="MenuFontSize">12</System:Double>
                    <System:Double x:Key="ContextMenuFontSize">12</System:Double>
                    <System:Double x:Key="StatusBarFontSize">12</System:Double>
                    <System:Double x:Key="ToggleSwitchFontSize">12</System:Double>
                    <System:Double x:Key="ToggleSwitchHeaderFontSize">12</System:Double>
                    <System:Double x:Key="UpperCaseContentFontSize">12</System:Double>
                    <System:Double x:Key="TabItemFontSize">12</System:Double>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
App.xaml

相关文章: