public static void BringSubviewToFront(this NSView superView, NSView theView) { if(theView == null || !superView.Subviews.Contains(theView)) return; theView.RemoveFromSuperview(); superView.AddSubview(theView); }