当前位置: 欣欣网 > 码农

一款开源的.NET框架UI库赏析学习

2024-02-03码农

概述

今天给大家介绍一款非常强大的wpf开源ui库wpftoolkit,这个控件库包括很多WPF常用的控件库,可以大幅度提升wpf从业者的开发效率,避免重复造轮子.下面跟着小编一起来学习这套控件库怎么用吧!

下载链接:

https://github.com/xceedsoftware/wpftoolkit

目前github的关注量: 3.7K

界面展示

主界面展示:

按钮展示:

DataGrid展示:

Chart展示:

常用的输入控件展示

扁平化的子窗体:

窗体处于工作状态

进度条:

计算器:

wizard

以上只展示了部分常用控件,有兴趣的可以下载下来学习使用,源码下载下来可以直接启动项目欣赏界面效果,右侧有对用的界面前台和后台代码。

用法介绍

step1:nuget安装

step2:使用:

<Windowx: class="WpfApp17.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:local="clr-namespace:WpfApp17"xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"mc:Ignorable="d"Title="MainWindow"Height="450"Width="800"><Window.Resources><Imagex:Key="Image1"Source="Resources/PencilTool16.png"Width="20"Margin="5" /></Window.Resources><StackPanelGrid.Row="1"Margin="10"><xctk:IconButtonx:Name="_iconButton"Content="Test"Icon="{StaticResource Image1}"IconLocation="Left"MouseOverForeground="Black"MousePressedForeground="White"MouseOverBackground="LightBlue"MousePressedBackground="Blue"MouseOverBorderBrush="LightGray"MousePressedBorderBrush="LightGray"Margin="10"Padding="20,3"HorizontalAlignment="Center"></xctk:IconButton></StackPanel></Window>

step3 :运行结果

技术群: 添加小编微信并备注进群

小编微信:mm1552923

公众号:dotNet编程大全