1、创建WPF工程

首先创建WPF工程

2、安装HandyControl

点击工具->NuGet包管理器->管理解决方案的NuGet程序包,如图所示:

在这里插入图片描述
直接搜索HandyControl,如图所示:

在这里插入图片描述
点击安装:

在这里插入图片描述
安装完成:

在这里插入图片描述

3、App.xaml加代码

在App.xaml中加入如下代码:

    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
        <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>

如图所示:

在这里插入图片描述

4、开始使用HandyControl

工具箱中已新增HandyControl,可以开始使用,如图所示:

在这里插入图片描述
HandyControl: https://github.com/NaBian/HandyControl

希望本文对大家有帮助,上文若有不妥之处,欢迎指正

分享决定高度,学习拉开差距

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐