我这边没有重现问题,
- public PropertyGrid()
- {
- InitializeComponent();
- var source = new Product();
- c1PropertyGrid1.SelectedObject = source;
-
- }
复制代码
- [Display(Name = "品名", Description = "产品的名称")]
- public string Name
- {
- get { return (string)GetValue("Name"); }
- set { SetValue("Name", value); }
- }
复制代码
- <c1:C1PropertyGrid Height="250" HorizontalAlignment="Left" Margin="10,8,0,0" Name="c1PropertyGrid1" VerticalAlignment="Top" Width="263"
- AutoGenerateProperties="True" Background="#FFF27979"
- SelectedObject="{Binding}"/>
复制代码
|