1.
首先在引用里右键 管理NuGet程序包 查找extended wpf toolkit 并安装
2.
引用DLL xmlns:extoolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
3.
<extoolkit:PropertyGrid Name="PropertyGrid1" Margin="0,45,-0.333,-0.333"></extoolkit:PropertyGrid>
<Button Content="Button" Click="button1_Click" HorizontalAlignment="Left" Margin="47,10,0,0" VerticalAlignment="Top" Width="75"/>
后台:
private void button1_Click(object sender, RoutedEventArgs e)
{
PropertyGrid1.SelectedObject = this;
}
这里this换成对应的数据类,就可以了
标签:控件,toolkit,右键,wpf,propertygrid,引用 From: https://www.cnblogs.com/rb-huang/p/17317272.html