The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

ImageValueConverter.StorageType Property

Gets the type that the property's value is converted to when it's saved in a data store.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public override Type StorageType { get; }
Public Overrides ReadOnly Property StorageType As Type

Property Value

Type Description
Type

The Type which the property's value is converted to and saved in a data store.

Remarks

The StorageType property returns the Type object for a System.Byte[] object.

Examples

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) {}

    [ValueConverter(typeof(DevExpress.Xpo.Metadata.ImageValueConverter))]
    public System.Drawing.Image Image {
        get { return image; }
        set {
            SetPropertyValue(nameof(Image) , ref image, value);
        }
    }
}
See Also