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

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

                WritePostscript();
            }
        }
示例#2
0
        protected virtual void AddChild(object child)
        {
            SingleKeyFrame keyFrame = child as SingleKeyFrame;

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

            WritePreamble();

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

            WritePostscript();
        }
        /// <summary>
        /// Adds a SingleKeyFrame to the collection.
        /// </summary>
        public int Add(SingleKeyFrame 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)
        {
            SingleKeyFrameCollection sourceCollection = (SingleKeyFrameCollection)sourceFreezable;

            base.CloneCore(sourceFreezable);

            int count = sourceCollection._keyFrames.Count;

            _keyFrames = new List <SingleKeyFrame>(count);

            for (int i = 0; i < count; i++)
            {
                SingleKeyFrame keyFrame = (SingleKeyFrame)sourceCollection._keyFrames[i].Clone();
                _keyFrames.Add(keyFrame);
                OnFreezablePropertyChanged(null, keyFrame);
            }
        }
		public void Remove ( SingleKeyFrame item ) {
			this.KeyFrames.Remove ( item );
	        _lastDuration = TimeSpan.FromSeconds ( -1 );
		}
        /// <summary>
        /// Returns the index of a given SingleKeyFrame in the collection.
        /// </summary>
        public int IndexOf(SingleKeyFrame keyFrame)
        {
            ReadPreamble();

            return(_keyFrames.IndexOf(keyFrame));
        }
 public int Add(SingleKeyFrame keyFrame)
 {
   return default(int);
 }
	public bool Contains (SingleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
 public void CopyTo(SingleKeyFrame[] array, int index)
 {
 }
 public int IndexOf(SingleKeyFrame keyFrame)
 {
     return(default(int));
 }
	public void Remove (SingleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
示例#13
0
        /// <summary>
        /// Adds a SingleKeyFrame to the collection.
        /// </summary>
        public int Add(SingleKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

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

            WritePostscript();

            return _keyFrames.Count - 1;
        }
示例#14
0
        /// <summary>
        /// Returns true of the collection contains the given SingleKeyFrame.
        /// </summary>
        public bool Contains(SingleKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.Contains(keyFrame);
        }
示例#15
0
 public bool Contains(SingleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
示例#16
0
        /// <summary>
        /// Copies all of the SingleKeyFrames in the collection to an
        /// array of SingleKeyFrames.
        /// </summary>
        public void CopyTo(SingleKeyFrame[] array, int index)
        {
            ReadPreamble();

            _keyFrames.CopyTo(array, index);
        }
示例#17
0
 public int Add(SingleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
示例#18
0
 public void Remove(SingleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
示例#19
0
 public void Insert(int index, SingleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public int Add(SingleKeyFrame keyFrame)
 {
     return(default(int));
 }
示例#21
0
        /// <summary>
        /// Returns the index of a given SingleKeyFrame in the collection. 
        /// </summary>
        public int IndexOf(SingleKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.IndexOf(keyFrame);
        }
 public bool Contains(SingleKeyFrame keyFrame)
 {
     return(default(bool));
 }
示例#23
0
        /// <summary>
        /// Inserts a SingleKeyFrame into a specific location in the collection. 
        /// </summary>
        public void Insert(int index, SingleKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

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

            WritePostscript();
        }
	public void Insert (int index, SingleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
示例#25
0
        /// <summary>
        /// Removes a SingleKeyFrame from the collection.
        /// </summary>
        public void Remove(SingleKeyFrame keyFrame)
        {
            WritePreamble();

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

                WritePostscript();
            }
        }
	public int Add (SingleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
 public void Remove(SingleKeyFrame keyFrame)
 {
 }
	public void CopyTo (SingleKeyFrame[] array, int index)
	{
		throw new NotImplementedException ();
	}
示例#29
0
 public void Remove(SingleKeyFrame item)
 {
     this.KeyFrames.Remove(item);
     _lastDuration = TimeSpan.FromSeconds(-1);
 }
示例#30
0
        /// <summary>
        /// Returns true of the collection contains the given SingleKeyFrame.
        /// </summary>
        public bool Contains(SingleKeyFrame keyFrame)
        {
            ReadPreamble();

            return(_keyFrames.Contains(keyFrame));
        }
 public void Insert(int index, SingleKeyFrame keyFrame)
 {
 }
 public bool Contains(SingleKeyFrame keyFrame)
 {
   return default(bool);
 }
 public void Remove(SingleKeyFrame keyFrame)
 {
 }
 public void Insert(int index, SingleKeyFrame keyFrame)
 {
 }
 public int IndexOf(SingleKeyFrame keyFrame)
 {
   return default(int);
 }