Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

CALayer issues while changing NSView background

$
0
0

I am trying to add a subview to a view by calling the AddSubview method on view. Since I want the View's and Subviews' background to be of custom colour, I customised their appearance by setting WantsLayer to true and changing the Layer.BackgroundColor property. It works fine - the subview gets added to the view with the desired background. But I am having strange issues as I am seeing blocks around the elements -

As you can see, I can see blocks of black colour around Progress Indicator and Loading label. I can even see a block of View's label (top left) - that is actually behind the subview. I guess the issue is because of the layer enabling.

P.S.: I know this is not a Xamarin.Mac specific question, but I have searched a lot about this issue and still not able to find anything. Posting here hoping that I would get to know what the issue could be. The app is a macOS menu bar app. The subview is loaded from a .xib file.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>