介绍几款WPF应用的UI库

在WPF中对于前端页面的书写,我们有现成的UI类库,不需要我们自己再去写
我这里介绍几款
1、MahApps
官网

https://mahapps.com/

使用,在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/Themes/Light.Blue.xaml" />
         </ResourceDictionary.MergedDictionaries>
     </ResourceDictionary>
 </Application.Resources>

主界面引入

    xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"

修改MainWindow为mah:MetroWindow

2、MaterialDesign
官网

http://materialdesigninxaml.net/

App.xaml引入

 xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"

使用,在App.xaml中添加

 <Application.Resources>
     <ResourceDictionary>
         <ResourceDictionary.MergedDictionaries>
             <md:BundledTheme
                 BaseTheme="Light"
                 PrimaryColor="LightGreen"
                 SecondaryColor="Lime" />
             <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
         </ResourceDictionary.MergedDictionaries>
     </ResourceDictionary>
 </Application.Resources>

3、HandyOrg

https://handyorg.gitee.io/handycontrol/

使用,在App.xaml中添加

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

4、LayUI
官网没有Gitee

https://gitee.com/ywk1916b/Layui-WPF

使用,在App.xaml添加

<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/LayUI.Wpf;component/Themes/Default.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
</Application.Resources>

 

出处:https://www.cnblogs.com/guchen33/p/17631582.html

=======================================================================================

国人开发的免费开源wpf ui控件库 handycontrol

官网 https://handyorg.gitee.io/handycontrol/quick_start/

https://gitee.com/handyorg/HandyControl

https://github.com/HandyOrg/HandyControl/blob/master/README-cn.md

编译视频  https://www.bilibili.com/video/BV1Yb4y1D7JP

demo下载地址  https://github.com/HandyOrg/HandyControl/releases/tag/v3.1.0

 

 

例子源代码:  GitHub - AFei19911012/HandyControl ,WPF HandyControl各个控件使用案例;修改主题、颜色、语言。

 

同时,MVVM 请下载共享项目,放在同级目录即可
http://github.com/AFei19911012/GalaSoft.MvvmLight

 

 

出处:https://www.cnblogs.com/simadi/p/14690356.html

参考:https://zhuanlan.zhihu.com/p/393756032

posted on 2023-08-15 21:21  jack_Meng  阅读(3416)  评论(0编辑  收藏  举报

导航