01—安装devexpress
按照如下所示,基本是一路默认点击:.
step2:
02—激活
03—工具箱附加和汉化
这里参考了:https://www.cnblogs.com/xishuai/p/3554594.html
但是上面写的很多了试了并没有生效。
那就自己搞吧!
① 在C:\Program Files (x86)\DevExpress 20.1\Components\Bin\Framework路径下找见需要使用的库,比如:DevExpress.Xpf.Core.v20.1.dll,dx:SimpleButton等常用控件就在这个库里面。
②在工具箱右键-》选择项-》wpf组件中浏览需要添加的库,然后确定
这个库下所有的控件就出现在了工具箱
汉化的话没有试,需要的自己参考那位仁兄的说明尝试.
04—项目测试
XAML代码:
<Window x:Class="WpfApp2.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:WpfApp2" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<dx:SimpleButton Name="btnCtrl" Content="DevButton" Width="100" Height="40" Click="btnCtrl_Click"/>
<dx:SimpleButton Content="SimpleButton" Grid.Column="1" HorizontalAlignment="Left" Margin="86.333,68,0,0" VerticalAlignment="Top" Width="75"/>
</Grid>
</Window>
后台:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void btnCtrl_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("第一个wpf dev控件测试项目");
}
}
结果: