System.Windows.Data.DataList.MoveToItem C# (CSharp) Method

MoveToItem() public method

Sets the current item to the specified item.
public MoveToItem ( object item ) : void
item object The item that should become the current item.
return void
        public void MoveToItem(object item)
        {
            VerifyValidItem(item);

            if (IsCurrencyEnabled == false) {
                throw new InvalidOperationException("This DataList does not support currency.");
            }

            int index = _snapShot.IndexOf(item);
            CurrentIndex = index;

            RaisePropertyChanged("CanMovePrevious");
            RaisePropertyChanged("CanMoveNext");
            RaisePropertyChanged("CurrentItem");
        }