ViewModel with Block without a Controller

I am trying to create some consistency to my blocks (i.e. title, padding, background-color) so I created a layout for a block. I followed the IPageViewModel and created a IBlockViewModel<T> and that is the model of my layout class. T has properties about the block title, background-color, etc.. I followed the same procedures as how the pages are done from the Alloy Sample. 

That works great when I have a block that has a controller,  but for simple blocks that just display a few properties I don't have a controller (for performance reasons). The problem is that the model that is getting passed to those views is Castle.Proxies.[MyBlock].  I need it to be IBlockViewModel<T>. Is there anyway I can adjust the model that is getting passed in without creating a Controller for all my blocks?

Is there an alternative to what I am trying to do?  Please any suggestions would be greatly appreciated.

Mike

#183089 Oct 04, 2017 18:58