Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / Animation / ExponentialEase.cs / 1305600 / ExponentialEase.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation, 2008 // // File: ExponentialEase.cs //----------------------------------------------------------------------------- using MS.Internal; namespace System.Windows.Media.Animation { ////// This class implements an easing function that gives an exponential curve /// public class ExponentialEase : EasingFunctionBase { public ExponentialEase() { } ////// Factor Property /// public static readonly DependencyProperty ExponentProperty = DependencyProperty.Register( "Exponent", typeof(double), typeof(ExponentialEase), new PropertyMetadata(2.0)); ////// Specifies the factor which controls the shape of easing. /// public double Exponent { get { return (double)GetValue(ExponentProperty); } set { SetValueInternal(ExponentProperty, value); } } protected override double EaseInCore(double normalizedTime) { double factor = Exponent; if (DoubleUtil.IsZero(factor)) { return normalizedTime; } else { return (Math.Exp(factor * normalizedTime) - 1.0) / (Math.Exp(factor) - 1.0); } } protected override Freezable CreateInstanceCore() { return new ExponentialEase(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation, 2008 // // File: ExponentialEase.cs //----------------------------------------------------------------------------- using MS.Internal; namespace System.Windows.Media.Animation { ////// This class implements an easing function that gives an exponential curve /// public class ExponentialEase : EasingFunctionBase { public ExponentialEase() { } ////// Factor Property /// public static readonly DependencyProperty ExponentProperty = DependencyProperty.Register( "Exponent", typeof(double), typeof(ExponentialEase), new PropertyMetadata(2.0)); ////// Specifies the factor which controls the shape of easing. /// public double Exponent { get { return (double)GetValue(ExponentProperty); } set { SetValueInternal(ExponentProperty, value); } } protected override double EaseInCore(double normalizedTime) { double factor = Exponent; if (DoubleUtil.IsZero(factor)) { return normalizedTime; } else { return (Math.Exp(factor * normalizedTime) - 1.0) / (Math.Exp(factor) - 1.0); } } protected override Freezable CreateInstanceCore() { return new ExponentialEase(); } } } // 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
- StrongTypingException.cs
- HttpConfigurationSystem.cs
- UrlMappingCollection.cs
- FileInfo.cs
- Latin1Encoding.cs
- counter.cs
- ToolBarButtonDesigner.cs
- PlainXmlWriter.cs
- StringUtil.cs
- FormViewUpdateEventArgs.cs
- DataServiceKeyAttribute.cs
- MouseWheelEventArgs.cs
- NullableFloatAverageAggregationOperator.cs
- AssemblyCollection.cs
- CustomErrorsSection.cs
- FloaterParaClient.cs
- SchemaMapping.cs
- BuildProviderAppliesToAttribute.cs
- TrackingMemoryStreamFactory.cs
- EditorPartChrome.cs
- DrawingImage.cs
- XamlWrappingReader.cs
- XmlBinaryReaderSession.cs
- Events.cs
- Composition.cs
- QueryStringConverter.cs
- TdsParserStaticMethods.cs
- LinearQuaternionKeyFrame.cs
- Rijndael.cs
- StandardBindingCollectionElement.cs
- RangeContentEnumerator.cs
- AnimationLayer.cs
- PhysicalAddress.cs
- XmlLoader.cs
- ClientSession.cs
- HtmlEncodedRawTextWriter.cs
- JsonFormatReaderGenerator.cs
- WebPartConnectionsConfigureVerb.cs
- PictureBox.cs
- LinkedResource.cs
- VirtualDirectoryMapping.cs
- TraceXPathNavigator.cs
- SerialPinChanges.cs
- PropertyTabChangedEvent.cs
- DynamicILGenerator.cs
- MediaContext.cs
- ILGenerator.cs
- SkinBuilder.cs
- RootBrowserWindowProxy.cs
- Rule.cs
- DesignerTextBoxAdapter.cs
- StrongName.cs
- DataGridTableCollection.cs
- BatchWriter.cs
- TypeTypeConverter.cs
- HttpWrapper.cs
- ObjectContextServiceProvider.cs
- ProviderBase.cs
- TypeHelpers.cs
- DispatcherEventArgs.cs
- AnnotationResourceCollection.cs
- Executor.cs
- CompositionTarget.cs
- Delegate.cs
- ProxyWebPartManager.cs
- MonthChangedEventArgs.cs
- Transform3DGroup.cs
- BitmapEffectDrawingContextState.cs
- RIPEMD160.cs
- DataTableTypeConverter.cs
- CellParagraph.cs
- XmlDomTextWriter.cs
- EnumerableCollectionView.cs
- ConnectionManager.cs
- ExpressionConverter.cs
- VScrollProperties.cs
- CodeCommentStatement.cs
- XmlILStorageConverter.cs
- HwndMouseInputProvider.cs
- TextDecorations.cs
- ServiceOperationParameter.cs
- DiscoveryMessageSequenceCD1.cs
- XmlNamedNodeMap.cs
- ImageUrlEditor.cs
- XsdDateTime.cs
- MessageEventSubscriptionService.cs
- Walker.cs
- ComponentCommands.cs
- QueryActivatableWorkflowsCommand.cs
- SharedUtils.cs
- AuthenticateEventArgs.cs
- Socket.cs
- COM2ExtendedUITypeEditor.cs
- SimpleWebHandlerParser.cs
- serverconfig.cs
- ObjectFullSpanRewriter.cs
- SortExpressionBuilder.cs
- Serialization.cs
- RawStylusInputCustomDataList.cs
- TemplatedMailWebEventProvider.cs