Skip to main content
A newer version of this page is available. .

How to: Implement the Instant Feedback Mode (XPO)

  • 4 minutes to read

In this example, the grid is bound to an XPInstantFeedbackSource object which activates an Instant Feedback UI Mode. In this mode, you will no longer experience any UI freezing. Data operations will be performed asynchronously, in a background thread and both the grid and your application will be always highly responsive.

using System;
using DevExpress.Xpo;

namespace InstantFeedbackMode {
    public class TestObject : XPObject {
        string _subject;
        public string Subject {
            get { return _subject; }
            set { SetPropertyValue<string>("Subject", ref _subject, value); }
        }
        DateTime _sent;
        public DateTime Sent {
            get { return _sent; }
            set { SetPropertyValue<DateTime>("Sent", ref _sent, value); }
        }

        bool _hasAttachment;
        public bool HasAttachment {
            get { return _hasAttachment; }
            set { SetPropertyValue<bool>("HasAttachment", ref _hasAttachment, value); }
        }
        public TestObject(Session session) : base(session) { }
        public TestObject() : base(Session.DefaultSession) { }
        public override void AfterConstruction() { base.AfterConstruction(); }
    }
}