diff options
author | Eric Maupin <ermaup@microsoft.com> | 2019-09-17 22:13:56 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2019-09-17 22:13:56 +0300 |
commit | a94977487bb8e4a7c83a795ead4c7a410c2631c7 (patch) | |
tree | 18d02b1e97faf72553f627d6673a5109cd88d986 | |
parent | 45ff1775a2c50bdad3e398f0b86ec910f1adfd62 (diff) |
[mac] Remove old tabs on TargetPlatform change
-rw-r--r-- | Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs index bd30c24..850665a 100644 --- a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs +++ b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs @@ -89,7 +89,9 @@ namespace Xamarin.PropertyEditing.Mac var views = this.tabStack.Views; for (int i = 0; i < views.Length; i++) { - ((TabButton)views[i]).Clicked -= OnArrangeModeChanged; + var button = (TabButton)views[i]; + button.Clicked -= OnArrangeModeChanged; + button.RemoveFromSuperview (); } } |