Wpf designer fixes

Fixes a couple of issues when working with invisible controls in the designer, and some other stuff in BorderForInvisibleControl.