概述
今天給大家介紹一款非常強大的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 :執行結果