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
- GenericsInstances.cs
- SingleStorage.cs
- VirtualPathUtility.cs
- InternalsVisibleToAttribute.cs
- mediapermission.cs
- ReverseComparer.cs
- SourceSwitch.cs
- Style.cs
- FileAuthorizationModule.cs
- FastEncoder.cs
- GroupedContextMenuStrip.cs
- WindowsClientCredential.cs
- Drawing.cs
- AtomServiceDocumentSerializer.cs
- ImmutablePropertyDescriptorGridEntry.cs
- FixedFlowMap.cs
- EpmContentSerializerBase.cs
- DataTableMappingCollection.cs
- Application.cs
- LocalFileSettingsProvider.cs
- GifBitmapDecoder.cs
- OperandQuery.cs
- AlphaSortedEnumConverter.cs
- Splitter.cs
- DataGridHyperlinkColumn.cs
- OleDbErrorCollection.cs
- TextViewElement.cs
- ComponentEditorForm.cs
- _FtpDataStream.cs
- BaseParagraph.cs
- PeerNodeAddress.cs
- InboundActivityHelper.cs
- SHA1Managed.cs
- ErrorActivity.cs
- XmlSchemaSimpleContentExtension.cs
- ResourceProperty.cs
- TextSimpleMarkerProperties.cs
- ToolStripManager.cs
- LingerOption.cs
- cache.cs
- XmlSchemaSubstitutionGroup.cs
- Keyboard.cs
- ConnectionManagementElementCollection.cs
- JournalEntryListConverter.cs
- ObjectListCommandsPage.cs
- RewritingProcessor.cs
- WorkflowTimerService.cs
- NotifyIcon.cs
- ResourcePermissionBase.cs
- TextElementCollection.cs
- HttpListenerException.cs
- ToolStripProgressBar.cs
- TreeView.cs
- CircleHotSpot.cs
- WebEventCodes.cs
- DefaultHttpHandler.cs
- TextServicesContext.cs
- WebPartDisplayModeCancelEventArgs.cs
- EndpointPerformanceCounters.cs
- TypeDelegator.cs
- ListViewItem.cs
- Preprocessor.cs
- HttpApplicationFactory.cs
- ExternalException.cs
- ObjectMemberMapping.cs
- AttributeUsageAttribute.cs
- SettingsAttributeDictionary.cs
- MgmtConfigurationRecord.cs
- DataGridViewRowPrePaintEventArgs.cs
- log.cs
- ExpandoClass.cs
- PrintDialog.cs
- ChtmlFormAdapter.cs
- LineServices.cs
- HiddenFieldPageStatePersister.cs
- ModelPerspective.cs
- And.cs
- SiteMapPath.cs
- ServicePrincipalNameElement.cs
- UserControlCodeDomTreeGenerator.cs
- FormattedText.cs
- ProxyGenerator.cs
- arabicshape.cs
- PageAsyncTaskManager.cs
- CodeStatement.cs
- SmtpNtlmAuthenticationModule.cs
- SmtpNegotiateAuthenticationModule.cs
- GifBitmapEncoder.cs
- XmlDocumentSerializer.cs
- DispatcherHooks.cs
- TTSEngineTypes.cs
- PersistencePipeline.cs
- XhtmlBasicCommandAdapter.cs
- DataMisalignedException.cs
- ColorIndependentAnimationStorage.cs
- DataGridViewColumnEventArgs.cs
- DbConnectionClosed.cs
- GroupByQueryOperator.cs
- TextWriterTraceListener.cs
- VirtualizingPanel.cs