Apple platform
macOS
Framework version
net9.0-*
Affected platform version
.NET 9
Description
According to the documentation, it should be possible to set a NSImage as the CALayer content, however the .NET bindings require an object of type CGImage
Steps to Reproduce
var layer = new CALayer();
layer.Contents = NSImage.GetSystemSymbol("plus", null);
Did you find any workaround?
yes, but it's quite hacky:
layer.SetValueForKey(NSImage.GetSystemSymbol("plus", null), new NSString("contents)");
Build logs
No response
Apple platform
macOS
Framework version
net9.0-*
Affected platform version
.NET 9
Description
According to the documentation, it should be possible to set a
NSImageas theCALayercontent, however the .NET bindings require an object of typeCGImageSteps to Reproduce
Did you find any workaround?
yes, but it's quite hacky:
layer.SetValueForKey(NSImage.GetSystemSymbol("plus", null), new NSString("contents)");Build logs
No response