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
- TransactionOptions.cs
- TrustSection.cs
- PassportAuthentication.cs
- SystemIPGlobalStatistics.cs
- HyperLinkColumn.cs
- DataGridRelationshipRow.cs
- BlobPersonalizationState.cs
- XmlException.cs
- SqlVisitor.cs
- TimeSpan.cs
- HttpModuleActionCollection.cs
- NestedContainer.cs
- SafeFileHandle.cs
- CompilerResults.cs
- GroupPartitionExpr.cs
- Exceptions.cs
- DetailsViewAutoFormat.cs
- CapabilitiesRule.cs
- ListParagraph.cs
- DataGridRowHeaderAutomationPeer.cs
- DetailsViewRow.cs
- CaseDesigner.xaml.cs
- ProtectedConfiguration.cs
- ProcessInfo.cs
- XmlSerializationWriter.cs
- HttpListenerPrefixCollection.cs
- UITypeEditors.cs
- VariableReference.cs
- ObjectHandle.cs
- BindingsCollection.cs
- ScrollChrome.cs
- DataGridViewDataConnection.cs
- Canvas.cs
- DataServiceQueryException.cs
- FixedFindEngine.cs
- RelationshipSet.cs
- WmlObjectListAdapter.cs
- WebPartTransformerAttribute.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SmtpNegotiateAuthenticationModule.cs
- PrtCap_Builder.cs
- OracleBinary.cs
- MSHTMLHost.cs
- GrammarBuilderPhrase.cs
- ResourceExpressionEditorSheet.cs
- PropertyDescriptors.cs
- Compiler.cs
- InvalidateEvent.cs
- GeneralTransformCollection.cs
- XsdBuildProvider.cs
- UpdateManifestForBrowserApplication.cs
- DBConnection.cs
- MeshGeometry3D.cs
- CompilationSection.cs
- MenuItemBinding.cs
- FontFamily.cs
- TrackingParameters.cs
- EditorPartChrome.cs
- ExtenderHelpers.cs
- DbConnectionPoolCounters.cs
- ACL.cs
- ProvidePropertyAttribute.cs
- TreeNodeBinding.cs
- QilValidationVisitor.cs
- PeerChannelFactory.cs
- XmlDsigSep2000.cs
- UIElementParaClient.cs
- SqlRemoveConstantOrderBy.cs
- SEHException.cs
- MethodBuilder.cs
- Visual.cs
- SqlDataSourceParameterParser.cs
- GenericArgumentsUpdater.cs
- IItemProperties.cs
- ReadOnlyHierarchicalDataSource.cs
- SymmetricAlgorithm.cs
- DropSource.cs
- PartitionedStream.cs
- GreaterThanOrEqual.cs
- SpeechSeg.cs
- DataGridDesigner.cs
- StorageConditionPropertyMapping.cs
- XmlComplianceUtil.cs
- MembershipValidatePasswordEventArgs.cs
- ViewSimplifier.cs
- NumericUpDown.cs
- Content.cs
- SecUtil.cs
- SqlMethodTransformer.cs
- TransportBindingElement.cs
- ZipIOCentralDirectoryBlock.cs
- UIElementIsland.cs
- SystemBrushes.cs
- __ComObject.cs
- Config.cs
- GridViewColumn.cs
- ObjectDataSourceEventArgs.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- LocatorPart.cs
- SRGSCompiler.cs