WPF、Winform框架使用汇总【AduSkin、HandyControl...】
WPF
一、AduSkin
官网:无
Github地址:https://github.com/aduskin/AduSkin
Gitee:https://gitee.com/aduskin/AduSkin
1.通过gitee或github下载
2.打开该解决方案
3.设为启动项
*如果电脑缺少对应的sd或运行时可以选择
3.1.微软官网下载(略)
3.2.移除相关引用
右键编辑项目引用,把不要的删除即可,例如删除.net9
以上操作完成重新生成项目,然后运行即可
4.部分样式展示:
5.使用:使用的时候可以参照demo类库下的UserControls以及Views页面
6.新建WPF项目控件测试,下载Aduskin Nuget包
7.回到MainView.xmal界面 需要用什么控件就回到源码程序查看需要用的控件
7.1.引入命名空间:xmlns:AduSkin="clr-namespace:AduSkin.Controls.Metro;assembly=AduSkin"
加入XMAL代码
<Grid>
<WrapPanel>
<AduSkin:AduFlatButton Content="普通弹框" Margin="5" Command="{Binding OpenMessageBoxCommand}" CommandParameter="普通弹框"/>
<AduSkin:AduFlatButton Content="普通弹框2" Margin="5" Command="{Binding OpenMessageBoxCommand}" CommandParameter="普通弹框2"/>
<AduSkin:AduFlatButton Content="确认取消弹框" Type="success" Margin="5" Command="{Binding OpenMessageBoxCommand}" CommandParameter="确认取消弹框"/>
<AduSkin:AduFlatButton Content="带图标确认取消弹框" Type="error" Width="130" Margin="5" Command="{Binding OpenMessageBoxCommand}" CommandParameter="带图标确认取消弹框"/>
<AduSkin:AduFlatButton Content="自定义弹框" Type="warning" Margin="5" Command="{Binding OpenMessageBoxCommand}" CommandParameter="自定义弹框"/>
</WrapPanel>
</Grid>
OK,大功告成!
二、HandyControl
官网:https://handyorg.github.io/handycontrol/
Github地址:https://github.com/HandyOrg/HandyControl
Gitee:https://gitee.com/handyorg/HandyControl
1.通过gitee或github下载
2.打开该解决方案
3. 分别右键HandyControl_Net_GE45、HandyControlDemo_Net_GE45,点击编辑项目,将netcoreapp3.1和net48中间的所有版本以及其他的不用的都删掉。
4.将HandyControlDemo_Net_GE45设为启动项,同时设置调试目标框架为4.8.1然后点击运行
5.部分页面截图
6.新建WPF项目控件测试
6.1安装HandyControl Nuget包
6.2App.xaml中引入
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
6.3 回到MainView界面,点击左侧工具箱,此时能看到HandyControl所有组件,查看HandyControl官网,随便找一个控件试试:https://handyorg.github.io/handycontrol/
window引入命名空间:xmlns:hc="https://handyorg.github.io/handycontrol"
加入XAML代码
<Grid>
<hc:StepBar Grid.ColumnSpan="2" StepIndex="1">
<hc:StepBarItem Content="1"/>
<hc:StepBarItem Content="2"/>
<hc:StepBarItem Content="3"/>
</hc:StepBar>
</Grid>
这时候就能看到控件展示的效果了
6.4 或者直接从左侧工具箱拖过来也是可以的
Winform
一、SunnyUI
官网:无
Github地址:https://github.com/yhuse/SunnyUI
Gitee:https://gitee.com/yhuse/SunnyUI
End!!!