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

How to: Delay Property Loading

This example demonstrates how to delay the loading of the Photo property. This property will be loaded the first time it is accessed.

using DevExpress.Xpo;

public class Person : XPObject {
    public Person(Session session) : base(session) { }

    [ValueConverter(typeof(DevExpress.Xpo.Metadata.ImageValueConverter)), Delayed]
    public System.Drawing.Image Photo {
        get { return GetDelayedPropertyValue<System.Drawing.Image>("Photo"); }
        set { SetDelayedPropertyValue<System.Drawing.Image>("Photo", value); }
See Also