Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit c2681a4

Browse files
author
tbulle
committed
PropertyGrid interface
1 parent 434151e commit c2681a4

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyGrid.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,19 @@
3535

3636
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid
3737
{
38-
public class PropertyGrid : INotifyPropertyChanged
38+
public interface IPropertyGrid
39+
{
40+
IEnumerable<DesignItem> SelectedItems { get; set; }
41+
Dictionary<MemberDescriptor, PropertyNode> NodeFromDescriptor { get; }
42+
DesignItem SingleItem { get; }
43+
string Name { get; set; }
44+
string OldName { get; }
45+
bool IsNameCorrect { get; set; }
46+
bool ReloadActive { get; }
47+
event EventHandler AggregatePropertiesUpdated;
48+
event PropertyChangedEventHandler PropertyChanged;
49+
}
50+
public class PropertyGrid : INotifyPropertyChanged, IPropertyGrid
3951
{
4052
public PropertyGrid()
4153
{

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyGridView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public PropertyGridView() : this(null)
4646
{
4747
}
4848

49-
public PropertyGridView(PropertyGrid pg)
49+
public PropertyGridView(IPropertyGrid pg)
5050
{
5151
PropertyGrid = pg??new PropertyGrid();
5252
DataContext = PropertyGrid;
@@ -64,7 +64,7 @@ public override void OnApplyTemplate()
6464

6565
static PropertyContextMenu propertyContextMenu = new PropertyContextMenu();
6666

67-
public PropertyGrid PropertyGrid { get; private set; }
67+
public IPropertyGrid PropertyGrid { get; private set; }
6868

6969
public static readonly DependencyProperty FirstColumnWidthProperty =
7070
DependencyProperty.Register("FirstColumnWidth", typeof(double), typeof(PropertyGridView),

0 commit comments

Comments
 (0)