Example #1
0
 private void UpdateSources(bool update0, bool update1, bool update2)
 {
     if (update1)
     {
         SlideView.SetDataContext(this._elements[1], this.GetItem(this._selectedIndex));
     }
     if (update0)
     {
         SlideView.SetDataContext(this._elements[0], this.GetItem(this._selectedIndex - 1));
     }
     if (!update2)
     {
         return;
     }
     SlideView.SetDataContext(this._elements[2], this.GetItem(this._selectedIndex + 1));
 }
Example #2
0
        private void UpdateSources(bool?movedForvard = null)
        {
            if (this._elements == null)
            {
                return;
            }
            if (!movedForvard.HasValue)
            {
                SlideView.SetDataContext(this._elements[1], this.GetItem(this._selectedIndex));
            }
            int num = !movedForvard.HasValue ? 1 : (movedForvard.Value ? 1 : 0);

            if ((!movedForvard.HasValue ? 1 : (!movedForvard.Value ? 1 : 0)) != 0)
            {
                SlideView.SetDataContext(this._elements[0], this.GetItem(this._selectedIndex - 1));
            }
            if (num == 0)
            {
                return;
            }
            SlideView.SetDataContext(this._elements[2], this.GetItem(this._selectedIndex + 1));
        }