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
- SqlWebEventProvider.cs
- XmlSerializerSection.cs
- DocumentGridContextMenu.cs
- XPathNavigatorKeyComparer.cs
- DoubleAnimation.cs
- BulletedList.cs
- ObjectListDataBindEventArgs.cs
- ToolStripControlHost.cs
- GuidelineSet.cs
- TextParagraphCache.cs
- QueryCursorEventArgs.cs
- RichTextBox.cs
- AggregateNode.cs
- BrowserCapabilitiesFactoryBase.cs
- ToolBarOverflowPanel.cs
- TreeViewImageKeyConverter.cs
- sqlinternaltransaction.cs
- SoapObjectInfo.cs
- BinaryNode.cs
- Win32SafeHandles.cs
- DocumentPageTextView.cs
- EdmConstants.cs
- OleDbStruct.cs
- EventMap.cs
- IMembershipProvider.cs
- Dictionary.cs
- WebBrowser.cs
- SeekableReadStream.cs
- MethodBuilder.cs
- TextRenderer.cs
- FixedPage.cs
- ConnectionPointCookie.cs
- GenericTextProperties.cs
- SqlDeflator.cs
- GridViewDeletedEventArgs.cs
- Inline.cs
- LogLogRecordHeader.cs
- WebZone.cs
- ShaperBuffers.cs
- TemplateComponentConnector.cs
- ExistsInCollection.cs
- Message.cs
- ParserHooks.cs
- Constant.cs
- WsdlBuildProvider.cs
- CollectionViewGroupInternal.cs
- TrackingQueryElement.cs
- CodeExporter.cs
- DbSourceParameterCollection.cs
- UriParserTemplates.cs
- HttpCacheVaryByContentEncodings.cs
- ArrayTypeMismatchException.cs
- PerformanceCounterManager.cs
- SetState.cs
- PermissionToken.cs
- RuntimeConfig.cs
- HandlerMappingMemo.cs
- AssemblyNameProxy.cs
- CacheEntry.cs
- DataRowView.cs
- WindowsListViewItemCheckBox.cs
- UniqueEventHelper.cs
- DesignerDataView.cs
- TypeResolver.cs
- GeneralTransform3DGroup.cs
- WebPartsPersonalizationAuthorization.cs
- SplineKeyFrames.cs
- ResXResourceReader.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- StringWriter.cs
- SettingsContext.cs
- ToolStripItemTextRenderEventArgs.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- CodeChecksumPragma.cs
- ExceptionRoutedEventArgs.cs
- ImageList.cs
- Main.cs
- AsyncContentLoadedEventArgs.cs
- NullableFloatAverageAggregationOperator.cs
- UInt64Converter.cs
- Section.cs
- CheckedListBox.cs
- FlowLayout.cs
- MdiWindowListStrip.cs
- ObjectListCommandsPage.cs
- SqlWebEventProvider.cs
- LicFileLicenseProvider.cs
- StructuralCache.cs
- ClientUrlResolverWrapper.cs
- DrawingBrush.cs
- Renderer.cs
- PageParser.cs
- OnOperation.cs
- DataGridViewColumnConverter.cs
- OutputCacheSettingsSection.cs
- ListBoxAutomationPeer.cs
- QilInvoke.cs
- BitmapCache.cs
- XmlUrlResolver.cs
- SmiXetterAccessMap.cs