AI OnAI Off
No it is not possible, block is a special kind of content explicitly designed to be used both as property on other content but also as stand alone instances (shared blocks).
If you look at the definition of BlockData you can see that it does not implement IContent, instead is the interface "injected" at runtime for shared block instances.
Is it possible to use a custom IContent type as a property on a page/block/content?
For example, lets say I have the following class:
And I want to use it as a property (like a local block, but not a block) on a page/block/content:
This errors complaining about the property not being able to be mapped to a PropertyDefinitionType.
I know that I can implement complex custom properties (storing the values as JSON) using PropertyDefinitionTypePlugIn, but if possible, I'd like to leverage the "local block" functionality to render those fields automatically. Is there a way to treat custom IContent properties the same as a "local block?"