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
- ComEventsSink.cs
- ObjectListFieldsPage.cs
- FieldDescriptor.cs
- DispatcherOperation.cs
- _BaseOverlappedAsyncResult.cs
- LoginView.cs
- ProtectedProviderSettings.cs
- WindowsFormsSynchronizationContext.cs
- SeekStoryboard.cs
- IsolatedStorage.cs
- SchemaTableOptionalColumn.cs
- SiteMapDataSource.cs
- IdentifierCreationService.cs
- Line.cs
- ApplicationFileParser.cs
- TextEffect.cs
- SequenceRangeCollection.cs
- Decimal.cs
- VisualStyleInformation.cs
- TabPage.cs
- GatewayIPAddressInformationCollection.cs
- XmlnsCache.cs
- AsymmetricSignatureFormatter.cs
- DbParameterHelper.cs
- RepeatEnumerable.cs
- DiscoveryClientReferences.cs
- ReferencedAssemblyResolver.cs
- AutomationEvent.cs
- DurableInstance.cs
- _TransmitFileOverlappedAsyncResult.cs
- StateDesigner.cs
- WorkBatch.cs
- Int32.cs
- RIPEMD160Managed.cs
- HttpClientCertificate.cs
- SetState.cs
- LicenseProviderAttribute.cs
- SqlCommandBuilder.cs
- JavascriptCallbackMessageInspector.cs
- TextServicesCompartmentContext.cs
- ConfigurationSectionGroupCollection.cs
- EntityDataSourceConfigureObjectContext.cs
- IndentedTextWriter.cs
- SerializerProvider.cs
- IncrementalCompileAnalyzer.cs
- IntellisenseTextBox.cs
- FontFaceLayoutInfo.cs
- SuppressMessageAttribute.cs
- GridViewColumnHeader.cs
- Win32Exception.cs
- TextPointerBase.cs
- SortQuery.cs
- Process.cs
- Int16Animation.cs
- HashSetEqualityComparer.cs
- TextDecorationUnitValidation.cs
- DataGridViewDataConnection.cs
- InvalidAsynchronousStateException.cs
- IntAverageAggregationOperator.cs
- PopupEventArgs.cs
- GridViewEditEventArgs.cs
- DataGridViewImageCell.cs
- DataSourceHelper.cs
- ToolStripSeparatorRenderEventArgs.cs
- SqlTypeSystemProvider.cs
- Point3DKeyFrameCollection.cs
- TaskScheduler.cs
- AutomationPatternInfo.cs
- ClientProxyGenerator.cs
- BatchWriter.cs
- PageAdapter.cs
- DataFormats.cs
- TypeExtension.cs
- WebPartCatalogCloseVerb.cs
- GeometryDrawing.cs
- AuthorizationRule.cs
- EntityViewContainer.cs
- glyphs.cs
- Cursors.cs
- ProbeMatchesApril2005.cs
- InstanceData.cs
- LinkedResource.cs
- AbstractExpressions.cs
- TrustManagerPromptUI.cs
- ExceptionUtil.cs
- Compilation.cs
- SchemaAttDef.cs
- WebUtil.cs
- LinkedResource.cs
- AppModelKnownContentFactory.cs
- OneOfTypeConst.cs
- ServerType.cs
- ResourceDescriptionAttribute.cs
- xdrvalidator.cs
- MarkupCompilePass2.cs
- TemplateControl.cs
- PathGeometry.cs
- GridView.cs
- CacheChildrenQuery.cs
- DashStyle.cs