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
- ConfigurationValues.cs
- WebBrowserNavigatedEventHandler.cs
- MSAAEventDispatcher.cs
- BatchParser.cs
- SingleConverter.cs
- MetadataCache.cs
- CdpEqualityComparer.cs
- EmptyControlCollection.cs
- SurrogateDataContract.cs
- wmiprovider.cs
- EncoderNLS.cs
- CanonicalXml.cs
- ResourcePart.cs
- HostedAspNetEnvironment.cs
- XmlQualifiedNameTest.cs
- ScriptControl.cs
- DecimalAnimationUsingKeyFrames.cs
- ConnectionProviderAttribute.cs
- ToolStripDropDownItem.cs
- EntityModelBuildProvider.cs
- FixedPosition.cs
- MULTI_QI.cs
- DataRow.cs
- ConstrainedDataObject.cs
- HtmlTableRowCollection.cs
- DelayLoadType.cs
- PointLightBase.cs
- FamilyTypeface.cs
- WebDescriptionAttribute.cs
- MatrixCamera.cs
- DataGridLinkButton.cs
- Simplifier.cs
- CqlQuery.cs
- JoinCqlBlock.cs
- XmlLanguageConverter.cs
- RegexWriter.cs
- OdbcPermission.cs
- sqlcontext.cs
- ConfigurationSectionGroupCollection.cs
- TextBoxBase.cs
- BuilderElements.cs
- FilteredDataSetHelper.cs
- SqlSelectStatement.cs
- WindowsButton.cs
- EmbeddedMailObject.cs
- RpcResponse.cs
- ListViewInsertionMark.cs
- CodeRegionDirective.cs
- PageParser.cs
- IPAddress.cs
- ObjectQueryExecutionPlan.cs
- mil_sdk_version.cs
- XComponentModel.cs
- SiteMap.cs
- TextPenaltyModule.cs
- RestHandler.cs
- SafeHGlobalHandleCritical.cs
- CopyNodeSetAction.cs
- XmlWriterTraceListener.cs
- RequiredFieldValidator.cs
- ComplexObject.cs
- DateRangeEvent.cs
- Vector3D.cs
- Buffer.cs
- DSASignatureFormatter.cs
- SystemIPInterfaceProperties.cs
- DynamicMethod.cs
- SchemaAttDef.cs
- ServiceReference.cs
- DataGridColumn.cs
- SubpageParaClient.cs
- PropertyTabAttribute.cs
- DataQuery.cs
- AsymmetricKeyExchangeDeformatter.cs
- Compiler.cs
- VerticalAlignConverter.cs
- ServiceOperation.cs
- MenuAdapter.cs
- LifetimeManager.cs
- BuildResult.cs
- SafeNativeMethodsCLR.cs
- CodeVariableDeclarationStatement.cs
- UrlMappingsModule.cs
- Int32Rect.cs
- NumberEdit.cs
- SqlBooleanizer.cs
- BCLDebug.cs
- IProvider.cs
- RawStylusActions.cs
- WebServiceEnumData.cs
- ConnectionInterfaceCollection.cs
- Privilege.cs
- MostlySingletonList.cs
- ImageResources.Designer.cs
- PasswordPropertyTextAttribute.cs
- InputScopeConverter.cs
- PathFigureCollection.cs
- PositiveTimeSpanValidatorAttribute.cs
- StringWriter.cs
- GradientStopCollection.cs