diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs index d928094..bd30c24 100644 --- a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs +++ b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs @@ -197,16 +197,23 @@ namespace Xamarin.PropertyEditing.Mac NSLayoutConstraint.Create (this.propertyList, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1, 0), }); - ViewDidChangeEffectiveAppearance (); + UpdateResourceProvider (); } - private void UpdateResourceProvider() + public sealed override void ViewDidChangeEffectiveAppearance () { - this.propertyList.HostResourceProvider = HostResourceProvider; - this.header.HostResourceProvider = HostResourceProvider; - this.border.HostResourceProvider = HostResourceProvider; + base.ViewDidChangeEffectiveAppearance (); - ViewDidChangeEffectiveAppearance (); + UpdateResourceProvider (); + } + + private void UpdateResourceProvider () + { + if (this.propertyList != null) { + this.propertyList.HostResourceProvider = HostResourceProvider; + this.header.HostResourceProvider = HostResourceProvider; + this.border.HostResourceProvider = HostResourceProvider; + } } private void OnArrangeModeChanged (object sender, EventArgs e) |