wpf使用propertygrid控件
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换成对应的数据类,就可以了
自动驱动未来