/// <summary> /// Removes a ColorKeyFrame from the collection. /// </summary> public void Remove(ColorKeyFrame keyFrame) { WritePreamble(); if (_keyFrames.Contains(keyFrame)) { OnFreezablePropertyChanged(keyFrame, null); _keyFrames.Remove(keyFrame); WritePostscript(); } }
protected virtual void AddChild(object child) { ColorKeyFrame keyFrame = child as ColorKeyFrame; if (keyFrame != null) { KeyFrames.Add(keyFrame); } else { throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); } }
/// <summary> /// Inserts a ColorKeyFrame into a specific location in the collection. /// </summary> public void Insert(int index, ColorKeyFrame keyFrame) { if (keyFrame == null) { throw new ArgumentNullException("keyFrame"); } WritePreamble(); OnFreezablePropertyChanged(null, keyFrame); _keyFrames.Insert(index, keyFrame); WritePostscript(); }
private TimeSpan GetKeyFrameTime(ColorKeyFrame keyFrame, TimeSpan keyFramesDuration) { if (keyFrame.KeyTime.HasTimeSpan) { return(keyFrame.KeyTime.TimeSpan); } if (keyFrame.KeyTime.HasPercent) { return(keyFramesDuration.Scale(keyFrame.KeyTime.Percent)); } throw new Granular.Exception("KeyTime of type \"{0}\" is not supported", keyFrame.KeyTime.Type); }
/// <summary> /// Adds a ColorKeyFrame to the collection. /// </summary> public int Add(ColorKeyFrame 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) { ColorKeyFrameCollection sourceCollection = (ColorKeyFrameCollection)sourceFreezable; base.CloneCore(sourceFreezable); int count = sourceCollection._keyFrames.Count; _keyFrames = new List <ColorKeyFrame>(count); for (int i = 0; i < count; i++) { ColorKeyFrame keyFrame = (ColorKeyFrame)sourceCollection._keyFrames[i].Clone(); _keyFrames.Add(keyFrame); OnFreezablePropertyChanged(null, keyFrame); } }
public void Remove (ColorKeyFrame keyFrame) { throw new NotImplementedException (); }
/// <summary> /// Returns the index of a given ColorKeyFrame in the collection. /// </summary> public int IndexOf(ColorKeyFrame keyFrame) { ReadPreamble(); return _keyFrames.IndexOf(keyFrame); }
public void CopyTo(ColorKeyFrame[] array, int index) { }
public void Remove(ColorKeyFrame keyFrame) { throw new NotImplementedException(); }
public void Insert(int index, ColorKeyFrame keyFrame) { }
public int Add(ColorKeyFrame keyFrame) { return default(int); }
/// <summary> /// Returns the index of a given ColorKeyFrame in the collection. /// </summary> public int IndexOf(ColorKeyFrame keyFrame) { ReadPreamble(); return(_keyFrames.IndexOf(keyFrame)); }
public int Add(ColorKeyFrame keyFrame) { return(default(int)); }
public bool Contains(ColorKeyFrame keyFrame) { return(default(bool)); }
/// <summary> /// Returns true of the collection contains the given ColorKeyFrame. /// </summary> public bool Contains(ColorKeyFrame keyFrame) { ReadPreamble(); return(_keyFrames.Contains(keyFrame)); }
public void CopyTo (ColorKeyFrame[] array, int index) { throw new NotImplementedException (); }
public bool Contains (ColorKeyFrame keyFrame) { throw new NotImplementedException (); }
public int Add (ColorKeyFrame keyFrame) { throw new NotImplementedException (); }
public void Remove(ColorKeyFrame keyFrame) { }
public int IndexOf(ColorKeyFrame keyFrame) { return default(int); }
public bool Contains(ColorKeyFrame keyFrame) { throw new NotImplementedException(); }
public bool Contains(ColorKeyFrame keyFrame) { return default(bool); }
/// <summary> /// Adds a ColorKeyFrame to the collection. /// </summary> public int Add(ColorKeyFrame keyFrame) { if (keyFrame == null) { throw new ArgumentNullException("keyFrame"); } WritePreamble(); OnFreezablePropertyChanged(null, keyFrame); _keyFrames.Add(keyFrame); WritePostscript(); return _keyFrames.Count - 1; }
public void Insert(int index, ColorKeyFrame keyFrame) { throw new NotImplementedException(); }
/// <summary> /// Returns true of the collection contains the given ColorKeyFrame. /// </summary> public bool Contains(ColorKeyFrame keyFrame) { ReadPreamble(); return _keyFrames.Contains(keyFrame); }
public int Add(ColorKeyFrame keyFrame) { throw new NotImplementedException(); }
public void Insert (int index, ColorKeyFrame keyFrame) { throw new NotImplementedException (); }
/// <summary> /// Copies all of the ColorKeyFrames in the collection to an /// array of ColorKeyFrames. /// </summary> public void CopyTo(ColorKeyFrame[] array, int index) { ReadPreamble(); _keyFrames.CopyTo(array, index); }
public int IndexOf(ColorKeyFrame keyFrame) { return(default(int)); }