BLOB Image Properties in Domain Components
The example below illustrates how to implement BLOB Image Properties in a Domain Component interface. Declare a byte array property and apply the ImageEditorAttribute to it. Optionally, you can customize the behavior of the image editor using the attribute’s parameters.
[VisibleInListView(true)]
[ImageEditor(ListViewImageEditorMode = ImageEditorMode.PictureEdit,
DetailViewImageEditorMode = ImageEditorMode.PictureEdit, ListViewImageEditorCustomHeight = 40)]
byte[] ImageProperty { get; set; }
[Delayed(), FieldSize(SizeAttribute.Unlimited), VisibleInListViewAttribute(true)]
[ImageEditor(ListViewImageEditorMode = ImageEditorMode.PopupPictureEdit,
DetailViewImageEditorMode = ImageEditorMode.DropDownPictureEdit)]
byte[] ImageDelayedProperty { get; set; }
Refer to the ImageEditorAttribute topic for details on parameters passed to the ImageEditor attribute in the code above. You can also specify image options using the following properties in the Model Editor:
- IModelCommonMemberViewItem.ImageSizeMode
- IModelMember.DetailViewImageEditorMode
- IModelMember.DetailViewImageEditorFixedWidth
- IModelMember.DetailViewImageEditorFixedHeight
- IModelMember.ListViewImageEditorMode
- IModelMember.ListViewImageEditorCustomHeight
See Also