﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Crosslight -  How to implement ISupportIncrementalLoading</title><link>http://www.intersoftsolutions.com/Community/Crosslight/How-to-implement-ISupportIncrementalLoading/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title> How to implement ISupportIncrementalLoading</title><link>http://www.intersoftsolutions.com/Community/Crosslight/How-to-implement-ISupportIncrementalLoading/</link><pubDate>Thu, 20 Oct 2016 02:45:51 GMT</pubDate><dc:creator>yudi</dc:creator><category>Loading Incremental</category><category>ISupportIncrementalLoading</category><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Sorry for the delay in sending this.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I’m currently still investigating this issue and need more time to provide you with solution, suggestion, or sample.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I’ll get back to you as soon as possible.&lt;/span&gt;&lt;/p&gt;</description></item><item><title> How to implement ISupportIncrementalLoading</title><link>http://www.intersoftsolutions.com/Community/Crosslight/How-to-implement-ISupportIncrementalLoading/</link><pubDate>Fri, 14 Oct 2016 20:00:47 GMT</pubDate><dc:creator>gabriel</dc:creator><category>Loading Incremental</category><category>ISupportIncrementalLoading</category><description>&lt;p&gt;I wonder how I can implement ISupportRefresh because I followed the documentation (http://developer.intersoftsolutions.com/display/crosslight/Displaying+Data#DisplayingData-ImplementingIncrementalLoading), but could not implement the HasMoreItems and also could not implement the limit data,, someone could help me how I can do this.&lt;/p&gt;&lt;p&gt;Follow my ViewModel and my controller.&lt;/p&gt;&lt;p&gt;my viewmodel&lt;/p&gt;&lt;pre&gt;public class PersonListViewModel:ListViewModelBase&amp;lt;Person&amp;gt;, ISupportIncrementalLoading, ISupportRefresh
    {
        private bool _isDataLoading;
        private bool _enableIncrementalLoading;
        private bool _enableIncrementalRefresh;
        private bool _enableRefresh;
        WebApi rest;
       public PersonListViewModel()
        {
            rest = new WebApi();



            this.EnableIncrementalLoading = true;
            this.EnableAsyncFilter = true;
            this.EnableRefresh = true;
            LoadDataIncremental();
        }

        public bool EnableIncrementalLoading
        {
            get
            {
                return _enableIncrementalLoading;
            }

            set
            {
                if (_enableIncrementalLoading != value)
                {
                    _enableIncrementalLoading = value;
                    OnPropertyChanged("EnableIncrementalLoading");

                }
            }
        }



        public bool IsDataLoading
        {
            get
            {
                return _isDataLoading;
            }
            set
            {
                if (_isDataLoading != value)
                {
                    _isDataLoading = value;
                    OnPropertyChanged("IsDataLoading");
                }
            }
        }

        public async void LoadDataIncremental()
        {
            this.IsDataLoading = true;

            this.SourceItems = await rest.GetPersons();

            this.IsDataLoading = false;

        }

        public bool EnableIncrementalRefresh
        {
            get
            {
                return _enableIncrementalRefresh;
            }
            set
            {
                if (_enableIncrementalRefresh != value)
                {
                    _enableIncrementalRefresh = value;
                    OnPropertyChanged("EnableIncrementalRefresh");
                }
            }
        }

        public bool EnableRefresh
        {
            get
            {
                return _enableRefresh;
            }
            set
            {
                if (_enableRefresh != value)
                {
                    _enableRefresh = value;
                    OnPropertyChanged("EnableRefresh");
                }
            }
        }

        public bool HasMoreItems
        {
            get
            {
                throw new NotImplementedException();
            }
        }



        public async void RefreshData()
        {
            this.IsDataLoading = true;
            this.SourceItems = await rest.GetPersons();

            this.IsDataLoading = false;
        }
        protected override void ExecuteRefresh(object parameter)
        {
            base.ExecuteRefresh(parameter);
            this.RefreshData();
        }
    }&lt;/pre&gt;&lt;p&gt;&amp;nbsp;my controller&lt;/p&gt;&lt;pre&gt; public class PersonsController : ApiController
    {
        private DBEntities db = new DBEntities();

        // GET: api/Persons
        public IQueryable&amp;lt;Person&amp;gt; GetPersons()
        {
            return db.Persons.Take(20);
        }
}&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;


</description></item></channel></rss>