/// <summary>
        /// Removes a DecimalKeyFrame from the collection.
        /// </summary>
        public void Remove(DecimalKeyFrame keyFrame)
        {
            WritePreamble();

            if (_keyFrames.Contains(keyFrame))
            {
                OnFreezablePropertyChanged(keyFrame, null);
                _keyFrames.Remove(keyFrame);

                WritePostscript();
            }
        }
Beispiel #2
0
        protected virtual void AddChild(object child)
        {
            DecimalKeyFrame keyFrame = child as DecimalKeyFrame;

            if (keyFrame != null)
            {
                KeyFrames.Add(keyFrame);
            }
            else
            {
                throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child");
            }
        }
        /// <summary>
        /// Inserts a DecimalKeyFrame into a specific location in the collection.
        /// </summary>
        public void Insert(int index, DecimalKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Insert(index, keyFrame);

            WritePostscript();
        }
        /// <summary>
        /// Adds a DecimalKeyFrame to the collection.
        /// </summary>
        public int Add(DecimalKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Add(keyFrame);

            WritePostscript();

            return(_keyFrames.Count - 1);
        }
        /// <summary>
        /// Implementation of <see cref="System.Windows.Freezable.CloneCore(System.Windows.Freezable)">Freezable.CloneCore</see>.
        /// </summary>
        protected override void CloneCore(Freezable sourceFreezable)
        {
            DecimalKeyFrameCollection sourceCollection = (DecimalKeyFrameCollection)sourceFreezable;

            base.CloneCore(sourceFreezable);

            int count = sourceCollection._keyFrames.Count;

            _keyFrames = new List <DecimalKeyFrame>(count);

            for (int i = 0; i < count; i++)
            {
                DecimalKeyFrame keyFrame = (DecimalKeyFrame)sourceCollection._keyFrames[i].Clone();
                _keyFrames.Add(keyFrame);
                OnFreezablePropertyChanged(null, keyFrame);
            }
        }
        /// <summary>
        /// Copies all of the DecimalKeyFrames in the collection to an
        /// array of DecimalKeyFrames.
        /// </summary>
        public void CopyTo(DecimalKeyFrame[] array, int index)
        {
            ReadPreamble();

            _keyFrames.CopyTo(array, index);
        }
	public bool Contains (DecimalKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
	public void CopyTo (DecimalKeyFrame[] array, int index)
	{
		throw new NotImplementedException ();
	}
 public void Insert(int index, DecimalKeyFrame keyFrame)
 {
 }
	public int Add (DecimalKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
 public void Remove(DecimalKeyFrame keyFrame)
 {
 }
 public bool Contains(DecimalKeyFrame keyFrame)
 {
   return default(bool);
 }
        /// <summary>
        /// Removes a DecimalKeyFrame from the collection.
        /// </summary>
        public void Remove(DecimalKeyFrame keyFrame)
        {
            WritePreamble();

            if (_keyFrames.Contains(keyFrame))
            {
                OnFreezablePropertyChanged(keyFrame, null);
                _keyFrames.Remove(keyFrame);

                WritePostscript();
            }
        }
 public int IndexOf(DecimalKeyFrame keyFrame)
 {
   return default(int);
 }
        /// <summary>
        /// Adds a DecimalKeyFrame to the collection.
        /// </summary>
        public int Add(DecimalKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Add(keyFrame);

            WritePostscript();

            return _keyFrames.Count - 1;
        }
        /// <summary>
        /// Returns the index of a given DecimalKeyFrame in the collection. 
        /// </summary>
        public int IndexOf(DecimalKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.IndexOf(keyFrame);
        }
 public void Remove(DecimalKeyFrame keyFrame)
 {
 }
 public int Add(DecimalKeyFrame keyFrame)
 {
     return(default(int));
 }
        /// <summary>
        /// Returns the index of a given DecimalKeyFrame in the collection.
        /// </summary>
        public int IndexOf(DecimalKeyFrame keyFrame)
        {
            ReadPreamble();

            return(_keyFrames.IndexOf(keyFrame));
        }
        /// <summary>
        /// Returns true of the collection contains the given DecimalKeyFrame.
        /// </summary>
        public bool Contains(DecimalKeyFrame keyFrame)
        {
            ReadPreamble();

            return(_keyFrames.Contains(keyFrame));
        }
 public bool Contains(DecimalKeyFrame keyFrame)
 {
     return(default(bool));
 }
        /// <summary>
        /// Returns true of the collection contains the given DecimalKeyFrame.
        /// </summary>
        public bool Contains(DecimalKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.Contains(keyFrame);
        }
 public void Insert(int index, DecimalKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
        /// <summary>
        /// Inserts a DecimalKeyFrame into a specific location in the collection. 
        /// </summary>
        public void Insert(int index, DecimalKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Insert(index, keyFrame);

            WritePostscript();
        }
 public void Remove(DecimalKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public int Add(DecimalKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public bool Contains(DecimalKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public void Insert(int index, DecimalKeyFrame keyFrame)
 {
 }
	public void Insert (int index, DecimalKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
 public int Add(DecimalKeyFrame keyFrame)
 {
   return default(int);
 }
	public void Remove (DecimalKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
 public void CopyTo(DecimalKeyFrame[] array, int index)
 {
 }
 public int IndexOf(DecimalKeyFrame keyFrame)
 {
     return(default(int));
 }