protected override void OnBitStateChanged(ulong key, bool oldValue, bool newValue) { base.OnBitStateChanged(key, oldValue, newValue); if (key == EnableLoopingStateKey) { if (newValue) { this.mapper = new CircularRangeMapper(); } else { this.mapper = new RestrictedRangeMapper(); } this.RecalculateItemCount(); this.OnNotifyPropertyChanged("EnableLooping"); } else if (key == VirtualModeStateKey) { this.OnNotifyPropertyChanged("Virtualized"); } else if (key == EnableAutoLoopStateKey) { this.OnNotifyPropertyChanged("EnableAutoLoop"); } }
protected override void OnBitStateChanged(long key, bool oldValue, bool newValue) { base.OnBitStateChanged(key, oldValue, newValue); switch (key) { case 35184372088832: this.mapper = !newValue ? (RangeMapper) new RestrictedRangeMapper() : (RangeMapper) new CircularRangeMapper(); this.RecalculateItemCount(); this.OnNotifyPropertyChanged("EnableLooping"); break; case 70368744177664: this.OnNotifyPropertyChanged("Virtualized"); break; case 140737488355328: this.OnNotifyPropertyChanged("EnableAutoLoop"); break; } }