igor-tkachev / bltoolkit

Business Logic Toolkit for .NET
MIT License
297 stars 112 forks source link

Bitmap/Image property problem/question #371

Closed Ravenheart closed 8 years ago

Ravenheart commented 9 years ago

Greetings, I have a model that contains a Bitmap/Image property and BLToolkit throws an exception when it tries to .CreateInstance() that model. Specifically its the fact the Bitmap doesn't have a public constructor. Is there a way to configure BLToolkit to tell it how to build a new Bitmap/Image or how do I handle this situation?

Could not build the 'Picture' property of the 'Joystick.BOL.Models.ModuleArt.ArtPictureModel' type: type 'System.Drawing.Bitmap' has to have public default constructor.

Ravenheart commented 9 years ago

As a workaround I've made the property not-abstract and implemented INPC manually with a backing field.

ili commented 8 years ago

Yes, it is the way