Esempio n. 1
0
        /// <summary>
        /// Removes a DoubleKeyFrame from the collection.
        /// </summary>
        public void Remove(DoubleKeyFrame keyFrame)
        {
            WritePreamble();

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

                WritePostscript();
            }
        }
Esempio n. 2
0
        protected virtual void AddChild(object child)
        {
            DoubleKeyFrame keyFrame = child as DoubleKeyFrame;

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

            WritePreamble();

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

            WritePostscript();
        }
Esempio n. 4
0
        private TimeSpan GetKeyFrameTime(DoubleKeyFrame 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);
        }
Esempio n. 5
0
        /// <summary>
        /// Adds a DoubleKeyFrame to the collection.
        /// </summary>
        public int Add(DoubleKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

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

            WritePostscript();

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

            base.CloneCore(sourceFreezable);

            int count = sourceCollection._keyFrames.Count;

            _keyFrames = new List <DoubleKeyFrame>(count);

            for (int i = 0; i < count; i++)
            {
                DoubleKeyFrame keyFrame = (DoubleKeyFrame)sourceCollection._keyFrames[i].Clone();
                _keyFrames.Add(keyFrame);
                OnFreezablePropertyChanged(null, keyFrame);
            }
        }
 public void Insert(int index, DoubleKeyFrame keyFrame)
 {
 }
Esempio n. 8
0
        /// <summary>
        /// Returns the index of a given DoubleKeyFrame in the collection. 
        /// </summary>
        public int IndexOf(DoubleKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.IndexOf(keyFrame);
        }
Esempio n. 9
0
        /// <summary>
        /// Returns the index of a given DoubleKeyFrame in the collection.
        /// </summary>
        public int IndexOf(DoubleKeyFrame keyFrame)
        {
            ReadPreamble();

            return(_keyFrames.IndexOf(keyFrame));
        }
 public void Remove(DoubleKeyFrame keyFrame)
 {
 }
Esempio n. 11
0
 public int Add(DoubleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public bool Contains(DoubleKeyFrame keyFrame)
 {
   return default(bool);
 }
	public int Add (DoubleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
Esempio n. 14
0
 public void Insert(int index, DoubleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
	public void Insert (int index, DoubleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
	public void Remove (DoubleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
 public bool Contains(DoubleKeyFrame keyFrame)
 {
     return(default(bool));
 }
 public int Add(DoubleKeyFrame keyFrame)
 {
     return(default(int));
 }
 public void Remove(DoubleKeyFrame keyFrame)
 {
 }
Esempio n. 20
0
        /// <summary>
        /// Inserts a DoubleKeyFrame into a specific location in the collection. 
        /// </summary>
        public void Insert(int index, DoubleKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

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

            WritePostscript();
        }
	public bool Contains (DoubleKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
Esempio n. 22
0
        /// <summary>
        /// Removes a DoubleKeyFrame from the collection.
        /// </summary>
        public void Remove(DoubleKeyFrame keyFrame)
        {
            WritePreamble();

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

                WritePostscript();
            }
        }
	public void CopyTo (DoubleKeyFrame[] array, int index)
	{
		throw new NotImplementedException ();
	}
Esempio n. 24
0
 public void Remove(DoubleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public void CopyTo(DoubleKeyFrame[] array, int index)
 {
 }
Esempio n. 26
0
 public bool Contains(DoubleKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public void Insert(int index, DoubleKeyFrame keyFrame)
 {
 }
Esempio n. 28
0
        /// <summary>
        /// Returns true of the collection contains the given DoubleKeyFrame.
        /// </summary>
        public bool Contains(DoubleKeyFrame keyFrame)
        {
            ReadPreamble();

            return(_keyFrames.Contains(keyFrame));
        }
Esempio n. 29
0
        /// <summary>
        /// Adds a DoubleKeyFrame to the collection.
        /// </summary>
        public int Add(DoubleKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

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

            WritePostscript();

            return _keyFrames.Count - 1;
        }
 public int Add(DoubleKeyFrame keyFrame)
 {
   return default(int);
 }
Esempio n. 31
0
        /// <summary>
        /// Returns true of the collection contains the given DoubleKeyFrame.
        /// </summary>
        public bool Contains(DoubleKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.Contains(keyFrame);
        }
Esempio n. 32
0
        /// <summary>
        /// Updates the is expanded state.
        /// </summary>
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            this.contentContainer = this.GetTemplateChild(CollapsibleContentControl.ElementContentContainerName) as FrameworkElement;
            if (this.contentContainer != null)
            {
                this.resizeStoryboard = this.contentContainer.Resources[CollapsibleContentControl.ElementResizeStoryboardName] as Storyboard;
                if (this.resizeStoryboard != null && this.resizeStoryboard.Children.Count == 1)
                {
                    this.resizeHeightKeyFrame = (this.resizeStoryboard.Children[0] as DoubleAnimationUsingKeyFrames).KeyFrames[0];
                    if (this.resizeHeightKeyFrame != null)
                    {
                        this.defaultKeyTime = this.resizeHeightKeyFrame.KeyTime;
                    }
                }
            }

            this.contentPresenter = this.GetTemplateChild(CollapsibleContentControl.ElementContentPresenterName) as ContentPresenter;
            if (this.contentPresenter != null)
            {
                this.contentPresenter.SizeChanged += new SizeChangedEventHandler(this.ContentPresenter_SizeChanged);
            }

            this.UpdateExpandedState(false);
        }
 public int IndexOf(DoubleKeyFrame keyFrame)
 {
     return(default(int));
 }
Esempio n. 34
0
        /// <summary>
        /// Copies all of the DoubleKeyFrames in the collection to an
        /// array of DoubleKeyFrames.
        /// </summary>
        public void CopyTo(DoubleKeyFrame[] array, int index)
        {
            ReadPreamble();

            _keyFrames.CopyTo(array, index);
        }
 public int IndexOf(DoubleKeyFrame keyFrame)
 {
   return default(int);
 }