Skip to content

Commit 5bdc1ac

Browse files
author
tbulle
committed
interface for PropertyGrid.cs
1 parent 3013e87 commit 5bdc1ac

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

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

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

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

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)