Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/Custom/DynamicBox.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/DynamicBox.cs21
1 files changed, 14 insertions, 7 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/DynamicBox.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/DynamicBox.cs
index a3483a1..7a6aedd 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/Custom/DynamicBox.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/DynamicBox.cs
@@ -32,7 +32,7 @@ namespace Xamarin.PropertyEditing.Mac
set
{
this.hostResources = value;
- ViewDidChangeEffectiveAppearance ();
+ AppearanceChanged ();
}
}
@@ -45,7 +45,7 @@ namespace Xamarin.PropertyEditing.Mac
if (value == null)
FillColor = NSColor.Clear;
- ViewDidChangeEffectiveAppearance ();
+ AppearanceChanged ();
}
}
@@ -58,11 +58,21 @@ namespace Xamarin.PropertyEditing.Mac
if (value == null)
BorderColor = NSColor.Clear;
- ViewDidChangeEffectiveAppearance ();
+ AppearanceChanged ();
}
}
- public override void ViewDidChangeEffectiveAppearance ()
+ public sealed override void ViewDidChangeEffectiveAppearance ()
+ {
+ base.ViewDidChangeEffectiveAppearance ();
+
+ AppearanceChanged ();
+ }
+
+ private IHostResourceProvider hostResources;
+ private string fillColor, borderColor;
+
+ private void AppearanceChanged ()
{
if (this.fillColor != null) {
NSColor color = this.hostResources.GetNamedColor (this.fillColor);
@@ -80,8 +90,5 @@ namespace Xamarin.PropertyEditing.Mac
BorderColor = color;
}
}
-
- private IHostResourceProvider hostResources;
- private string fillColor, borderColor;
}
}