Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / Animation / BackEase.cs / 1305600 / BackEase.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation, 2008 // // File: BackEase.cs //----------------------------------------------------------------------------- namespace System.Windows.Media.Animation { ////// This class implements an easing function that backs up before going to the destination. /// public class BackEase : EasingFunctionBase { public BackEase() { } ////// Amplitude Property /// public static readonly DependencyProperty AmplitudeProperty = DependencyProperty.Register( "Amplitude", typeof(double), typeof(BackEase), new PropertyMetadata(1.0)); ////// Specifies how much the function will pull back /// public double Amplitude { get { return (double)GetValue(AmplitudeProperty); } set { SetValueInternal(AmplitudeProperty, value); } } protected override double EaseInCore(double normalizedTime) { double amp = Math.Max(0.0, Amplitude); return Math.Pow(normalizedTime, 3.0) - normalizedTime * amp * Math.Sin(Math.PI * normalizedTime); } protected override Freezable CreateInstanceCore() { return new BackEase(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation, 2008 // // File: BackEase.cs //----------------------------------------------------------------------------- namespace System.Windows.Media.Animation { ////// This class implements an easing function that backs up before going to the destination. /// public class BackEase : EasingFunctionBase { public BackEase() { } ////// Amplitude Property /// public static readonly DependencyProperty AmplitudeProperty = DependencyProperty.Register( "Amplitude", typeof(double), typeof(BackEase), new PropertyMetadata(1.0)); ////// Specifies how much the function will pull back /// public double Amplitude { get { return (double)GetValue(AmplitudeProperty); } set { SetValueInternal(AmplitudeProperty, value); } } protected override double EaseInCore(double normalizedTime) { double amp = Math.Max(0.0, Amplitude); return Math.Pow(normalizedTime, 3.0) - normalizedTime * amp * Math.Sin(Math.PI * normalizedTime); } protected override Freezable CreateInstanceCore() { return new BackEase(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OperatorExpressions.cs
- CmsInterop.cs
- TraceHandlerErrorFormatter.cs
- XmlAttributeCache.cs
- XmlSerializationGeneratedCode.cs
- PrintingPermission.cs
- CommandField.cs
- OracleEncoding.cs
- PageThemeCodeDomTreeGenerator.cs
- ImageCodecInfo.cs
- TaskFormBase.cs
- FixedSOMSemanticBox.cs
- HotSpot.cs
- COAUTHINFO.cs
- Root.cs
- WorkflowRuntimeServicesBehavior.cs
- OdbcReferenceCollection.cs
- StackOverflowException.cs
- SortDescription.cs
- ImageDrawing.cs
- TaskFileService.cs
- HtmlInputFile.cs
- XmlPropertyBag.cs
- InheritedPropertyDescriptor.cs
- LicenseException.cs
- ErrorStyle.cs
- DisableDpiAwarenessAttribute.cs
- _FtpDataStream.cs
- UInt64Converter.cs
- PasswordPropertyTextAttribute.cs
- AssemblyName.cs
- Panel.cs
- InputLanguageCollection.cs
- StreamWriter.cs
- ImpersonationContext.cs
- DictionaryEntry.cs
- FunctionUpdateCommand.cs
- SQLByteStorage.cs
- QilTypeChecker.cs
- Assert.cs
- ProfileElement.cs
- SystemSounds.cs
- EntityReference.cs
- Vector3DIndependentAnimationStorage.cs
- StrokeIntersection.cs
- TimeStampChecker.cs
- XmlReflectionMember.cs
- SerializationInfo.cs
- EntityDataSourceDesignerHelper.cs
- CodeCatchClause.cs
- BamlResourceContent.cs
- safex509handles.cs
- TextViewSelectionProcessor.cs
- BitmapFrameDecode.cs
- XmlQueryType.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- XmlBindingWorker.cs
- FlowNode.cs
- ObjectAnimationUsingKeyFrames.cs
- LinearQuaternionKeyFrame.cs
- LabelEditEvent.cs
- PointAnimation.cs
- TokenizerHelper.cs
- PropertyFilter.cs
- counter.cs
- XhtmlBasicImageAdapter.cs
- WeakEventManager.cs
- EntityDesignerUtils.cs
- StringComparer.cs
- Console.cs
- ClientSettings.cs
- SyndicationLink.cs
- MediaPlayer.cs
- BamlLocalizationDictionary.cs
- ReaderWriterLock.cs
- BoundingRectTracker.cs
- TextViewSelectionProcessor.cs
- CapabilitiesAssignment.cs
- StdValidatorsAndConverters.cs
- PermissionSet.cs
- GeometryModel3D.cs
- OdbcParameter.cs
- ThicknessKeyFrameCollection.cs
- SpanIndex.cs
- FixUpCollection.cs
- CalendarTable.cs
- InternalsVisibleToAttribute.cs
- Evidence.cs
- InkPresenter.cs
- ToolStripManager.cs
- FindCriteria11.cs
- ManualResetEventSlim.cs
- RegistryKey.cs
- AsynchronousChannelMergeEnumerator.cs
- WebServicesDescriptionAttribute.cs
- PrintControllerWithStatusDialog.cs
- DispatcherObject.cs
- Crypto.cs
- XmlProcessingInstruction.cs
- RewritingValidator.cs