Skip to main content

ImageValueConverter.ConvertFromStorageType(Object) Method

Converts a stored value from the ImageValueConverter.StorageType to its persistent property type.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v21.2.dll


public override object ConvertFromStorageType(
    object value


Name Type Description
value Object

An object which represents the value to convert.


Type Description

An object which represents the converted value. null (Nothing in Visual Basic) if the specified value is a null reference.


The ConvertFromStorageType method returns a value which is converted from the ImageValueConverter.StorageType to the type of persistent property it represents.


The following example shows how to convert the value of the Image property to an array of bytes when saving it in a data store.

using DevExpress.Xpo;

public class SampleImageClass : XPObject {
    private System.Drawing.Image image;
    public SampleImageClass(Session session) : base(session) {}

    public System.Drawing.Image Image {
        get { return image; }
        set {
            SetPropertyValue(nameof(Image) , ref image, value);
See Also