Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit c9f9f6f

Browse files
Dominique LouisCartBlanche
Dominique Louis
authored andcommitted
[Mac] Initial Variations Implementation
1 parent e619ba4 commit c9f9f6f

File tree

64 files changed

+1021
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1021
-198
lines changed

Xamarin.PropertyEditing.Mac/Controls/BasePathEditorControl.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ internal abstract class BasePathEditorControl<T> : PropertyEditorControl<Propert
2626
protected BasePathEditorControl (IHostResourceProvider hostResource)
2727
: base (hostResource)
2828
{
29-
this.currentTextField = new TextFieldSmallButtonContainer ();
29+
this.currentTextField = new TextFieldSmallButtonContainer {
30+
ControlSize = NSControlSize.Small,
31+
Font = NSFont.SystemFontOfSize (NSFont.SystemFontSizeForControlSize (NSControlSize.Small)),
32+
};
3033
this.currentTextField.Changed += CurrentTextField_Changed;
3134
AddSubview (this.currentTextField);
3235

@@ -72,9 +75,8 @@ protected BasePathEditorControl (IHostResourceProvider hostResource)
7275

7376
AddConstraints (new[] {
7477
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1, 0f),
75-
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1, 0f),
78+
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1, -2f),
7679
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1, 0f),
77-
NSLayoutConstraint.Create (this.currentTextField, NSLayoutAttribute.Height, NSLayoutRelation.Equal, this, NSLayoutAttribute.Height, 1, -6f),
7880
});
7981
}
8082

@@ -113,7 +115,7 @@ protected override void SetEnabled ()
113115
{
114116
this.currentTextField.Enabled =
115117
this.browsePathButton.Enabled =
116-
this.revealPathButton.Enabled = ViewModel.Property.CanWrite;
118+
this.revealPathButton.Enabled = ViewModel.IsInputEnabled;
117119
}
118120

119121
protected override void Dispose (bool disposing)

Xamarin.PropertyEditing.Mac/Controls/BasePointEditorControl.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ internal abstract class BasePointEditorControl<T> : PropertyEditorControl<Proper
1616
public override NSView FirstKeyView => XEditor;
1717
public override NSView LastKeyView => YEditor.DecrementButton;
1818

19+
protected override nint BaseHeight => 36;
20+
1921
protected BasePointEditorControl (IHostResourceProvider hostResources)
2022
: base (hostResources)
2123
{
@@ -46,23 +48,21 @@ protected BasePointEditorControl (IHostResourceProvider hostResources)
4648
AddSubview (YLabel);
4749
AddSubview (YEditor);
4850

49-
const float editorHeight = 18;
50-
this.AddConstraints (new[] {
51-
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
51+
nfloat labelHeight = NSFont.SystemFontSizeForControlSize (NSControlSize.Small);
52+
AddConstraints (new[] {
53+
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1f, BottomOffset + 1),
54+
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),
55+
56+
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, -1f),
5257
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
5358
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, YEditor, NSLayoutAttribute.Left, 1f, -10f),
54-
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),
55-
56-
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Bottom, 1f, -4f),
57-
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),
5859

59-
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
60+
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, YLabel, NSLayoutAttribute.Top, 1f, -1f),
6061
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0),
6162
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Width, 1f, 0f),
62-
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),
6363

6464
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, 0f),
65-
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, editorHeight),
65+
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),
6666

6767
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, XEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
6868
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, YEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
@@ -73,8 +73,8 @@ protected BasePointEditorControl (IHostResourceProvider hostResources)
7373

7474
protected override void SetEnabled ()
7575
{
76-
XEditor.Enabled = ViewModel.Property.CanWrite;
77-
YEditor.Enabled = ViewModel.Property.CanWrite;
76+
XEditor.Enabled =
77+
YEditor.Enabled = ViewModel.IsInputEnabled;
7878
}
7979

8080
protected override void UpdateAccessibilityValues ()

Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ internal abstract class BaseRectangleEditorControl<T> : PropertyEditorControl<Pr
2222
public override NSView FirstKeyView => XEditor;
2323
public override NSView LastKeyView => HeightEditor.DecrementButton;
2424

25+
protected override nint BaseHeight => 68;
26+
2527
protected BaseRectangleEditorControl (IHostResourceProvider hostResources)
2628
: base (hostResources)
2729
{
@@ -74,44 +76,41 @@ protected BaseRectangleEditorControl (IHostResourceProvider hostResources)
7476
AddSubview (HeightLabel);
7577
AddSubview (HeightEditor);
7678

77-
this.AddConstraints (new[] {
78-
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
79-
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
80-
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, YEditor, NSLayoutAttribute.Left, 1f, -10f),
81-
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
82-
83-
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Bottom, 1f, -4f),
84-
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
85-
86-
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 3f),
87-
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0),
88-
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Width, 1f, 0f),
89-
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
90-
91-
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, 0f),
92-
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
79+
nfloat labelHeight = NSFont.SystemFontSizeForControlSize (NSControlSize.Small);
80+
AddConstraints (new[] {
81+
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1f, BottomOffset + 1),
82+
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),
9383

94-
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 33f),
84+
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, WidthLabel, NSLayoutAttribute.Top, 1f, -1f),
9585
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
9686
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, HeightEditor, NSLayoutAttribute.Left, 1f, -10f),
97-
NSLayoutConstraint.Create (WidthEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
98-
99-
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Bottom, 1f, -4f),
100-
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
10187

102-
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Top, 1f, 0f),
88+
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, HeightLabel, NSLayoutAttribute.Top, 1f, -1f),
10389
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this, NSLayoutAttribute.Right, 1f, 0),
10490
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Width, 1f, 0f),
105-
NSLayoutConstraint.Create (HeightEditor, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
10691

10792
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, WidthLabel, NSLayoutAttribute.Top, 1f, 0f),
108-
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 18),
93+
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),
10994

95+
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, WidthEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
96+
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, HeightEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
97+
98+
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Top, 1f, 0f),
99+
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),
100+
101+
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, -1f),
102+
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Left, NSLayoutRelation.Equal, WidthEditor, NSLayoutAttribute.Left, 1f, 0f),
103+
NSLayoutConstraint.Create (XEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, YEditor, NSLayoutAttribute.Left, 1f, -10f),
104+
105+
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XLabel, NSLayoutAttribute.Top, 1f, 0f),
106+
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, labelHeight),
107+
108+
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Top, 1f, 0f),
109+
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Right, NSLayoutRelation.Equal, HeightEditor, NSLayoutAttribute.Right, 1f, 0),
110+
NSLayoutConstraint.Create (YEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, XEditor, NSLayoutAttribute.Width, 1f, 0f),
110111

111112
NSLayoutConstraint.Create (XLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, XEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
112113
NSLayoutConstraint.Create (YLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, YEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
113-
NSLayoutConstraint.Create (WidthLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, WidthEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
114-
NSLayoutConstraint.Create (HeightLabel, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal, HeightEditor.Subviews[0], NSLayoutAttribute.CenterX, 1f, 0),
115114
});
116115

117116
AppearanceChanged ();
@@ -124,10 +123,10 @@ protected virtual void OnInputUpdated (object sender, EventArgs e)
124123

125124
protected override void SetEnabled ()
126125
{
127-
XEditor.Enabled = ViewModel.Property.CanWrite;
128-
YEditor.Enabled = ViewModel.Property.CanWrite;
129-
WidthEditor.Enabled = ViewModel.Property.CanWrite;
130-
HeightEditor.Enabled = ViewModel.Property.CanWrite;
126+
XEditor.Enabled =
127+
YEditor.Enabled =
128+
WidthEditor.Enabled =
129+
HeightEditor.Enabled = ViewModel.IsInputEnabled;
131130
}
132131

133132
protected override void UpdateAccessibilityValues ()

Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ namespace Xamarin.PropertyEditing.Mac
88
internal class BooleanEditorControl
99
: PropertyEditorControl<PropertyViewModel<bool?>>
1010
{
11-
const string setBezelColorSelector = "setBezelColor:";
12-
1311
public BooleanEditorControl (IHostResourceProvider hostResource)
1412
: base (hostResource)
1513
{
@@ -29,8 +27,8 @@ public BooleanEditorControl (IHostResourceProvider hostResource)
2927

3028
AddSubview (BooleanEditor);
3129

32-
this.AddConstraints (new[] {
33-
NSLayoutConstraint.Create (BooleanEditor, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1f, 0f),
30+
AddConstraints (new[] {
31+
NSLayoutConstraint.Create (BooleanEditor, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, this, NSLayoutAttribute.Bottom, 1f, -4f),
3432
NSLayoutConstraint.Create (BooleanEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, 0f),
3533
});
3634
}
@@ -60,7 +58,7 @@ protected override void UpdateValue ()
6058

6159
protected override void SetEnabled ()
6260
{
63-
BooleanEditor.Enabled = ViewModel.Property.CanWrite;
61+
BooleanEditor.Enabled = ViewModel.IsInputEnabled;
6462
}
6563

6664
protected override void UpdateAccessibilityValues ()

Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public BrushEditorControl (IHostResourceProvider hostResources)
6464

6565
AddSubview (this.popUpButton);
6666

67-
this.AddConstraints (new[] {
67+
AddConstraints (new[] {
6868
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, 0),
6969
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1f, 16),
7070
NSLayoutConstraint.Create (this.popUpButton, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, this, NSLayoutAttribute.CenterY, 1f, 0),
@@ -84,7 +84,7 @@ public BrushEditorControl (IHostResourceProvider hostResources)
8484

8585
protected override void SetEnabled ()
8686
{
87-
this.popUpButton.Enabled = this.ViewModel?.Property.CanWrite ?? false;
87+
this.popUpButton.Enabled = ViewModel?.IsInputEnabled ?? false;
8888
}
8989

9090
string GetTitle ()
@@ -109,7 +109,7 @@ string GetTitle ()
109109
protected override void UpdateValue ()
110110
{
111111
this.brushTabViewController.ViewModel = ViewModel;
112-
this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? this.popover : null;
112+
this.popUpButton.Popover = (ViewModel?.IsInputEnabled ?? false) ? this.popover : null;
113113

114114
if (ViewModel.Solid != null) {
115115
var title = GetTitle ();

Xamarin.PropertyEditing.Mac/Controls/CollectionInlineEditorControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public CollectionInlineEditorControl (IHostResourceProvider hostResources)
5151
protected override void SetEnabled ()
5252
{
5353
base.SetEnabled ();
54-
this.openCollection.Enabled = ViewModel?.Property.CanWrite ?? false;
54+
this.openCollection.Enabled = ViewModel?.IsInputEnabled ?? false;
5555
}
5656

5757
protected override void UpdateAccessibilityValues ()

Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,18 @@ public CombinablePropertyEditor (IHostResourceProvider hostResources)
3030
public override nint GetHeight (EditorViewModel vm)
3131
{
3232
var realVm = (CombinablePropertyViewModel<T>)vm;
33-
return subrowHeight * realVm.Choices.Count + 6;
33+
nint baseHeight = subrowHeight * realVm.Choices.Count + 6;
34+
if (realVm != null && realVm.IsVariant) {
35+
return (baseHeight * 2);
36+
}
37+
38+
return baseHeight;
3439
}
3540

3641
protected override void SetEnabled ()
3742
{
3843
foreach (var item in this.combinableList) {
39-
item.Key.Enabled = ViewModel.Property.CanWrite;
44+
item.Key.Enabled = ViewModel.IsInputEnabled;
4045
}
4146
}
4247

@@ -66,7 +71,7 @@ protected override void OnViewModelChanged (PropertyViewModel oldModel)
6671

6772
AddSubview (checkbox);
6873

69-
this.AddConstraints (new[] {
74+
AddConstraints (new[] {
7075
NSLayoutConstraint.Create (checkbox, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, top),
7176
NSLayoutConstraint.Create (checkbox, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 0f),
7277
NSLayoutConstraint.Create (checkbox, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, 0),

Xamarin.PropertyEditing.Mac/Controls/Custom/BasePopOverControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public BasePopOverControl (IHostResourceProvider hostResources, string title, st
3939

4040
AddSubview (this.viewTitle);
4141

42-
this.AddConstraints (new[] {
42+
AddConstraints (new[] {
4343
NSLayoutConstraint.Create (iconView, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 5f),
4444
NSLayoutConstraint.Create (iconView, NSLayoutAttribute.Left, NSLayoutRelation.Equal, this, NSLayoutAttribute.Left, 1f, 5f),
4545
NSLayoutConstraint.Create (iconView, NSLayoutAttribute.Width, NSLayoutRelation.Equal, 1f, DefaultIconButtonSize),

Xamarin.PropertyEditing.Mac/Controls/Custom/BasePopOverViewModelControl.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using AppKit;
45
using Xamarin.PropertyEditing.ViewModels;
56

67
namespace Xamarin.PropertyEditing.Mac
@@ -9,6 +10,8 @@ internal class BasePopOverViewModelControl : BasePopOverControl
910
{
1011
internal PropertyViewModel ViewModel { get; }
1112

13+
public AutoClosePopOver PopOver { get; internal set; }
14+
1215
public BasePopOverViewModelControl (IHostResourceProvider hostResources, PropertyViewModel viewModel, string title, string imageNamed)
1316
: base (hostResources, title, imageNamed)
1417
{

0 commit comments

Comments
 (0)