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
- OutputCacheSection.cs
- ReflectionTypeLoadException.cs
- ScriptResourceAttribute.cs
- PermissionSetEnumerator.cs
- DrawingBrush.cs
- ThreadSafeList.cs
- DataSourceExpression.cs
- HwndSourceParameters.cs
- WebPartsPersonalizationAuthorization.cs
- GeneralTransform2DTo3DTo2D.cs
- KeyNotFoundException.cs
- TimeSpanHelper.cs
- Function.cs
- AvTraceDetails.cs
- RenamedEventArgs.cs
- WebPartManagerInternals.cs
- SettingsPropertyCollection.cs
- GridViewUpdatedEventArgs.cs
- ZipPackage.cs
- FileLoadException.cs
- CompoundFileStreamReference.cs
- TemplateBindingExpressionConverter.cs
- _UncName.cs
- Matrix3DConverter.cs
- httpapplicationstate.cs
- Part.cs
- GeometryHitTestParameters.cs
- AbandonedMutexException.cs
- TimerEventSubscription.cs
- TreeNode.cs
- GlyphElement.cs
- OptimizedTemplateContent.cs
- ChannelManagerService.cs
- ListMarkerLine.cs
- CorrelationManager.cs
- LinkDescriptor.cs
- UnsafeNativeMethods.cs
- SqlMethodAttribute.cs
- IItemContainerGenerator.cs
- KeyProperty.cs
- SecurityNegotiationException.cs
- XamlRtfConverter.cs
- OutputWindow.cs
- AccessDataSourceWizardForm.cs
- RemotingConfigParser.cs
- Exceptions.cs
- WebBrowserDocumentCompletedEventHandler.cs
- Compiler.cs
- ContextProperty.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- HttpException.cs
- QuadraticBezierSegment.cs
- Single.cs
- UnsafeNativeMethods.cs
- SqlCommand.cs
- CollectionViewProxy.cs
- LinkClickEvent.cs
- GenericNameHandler.cs
- DataRelation.cs
- TraceContextRecord.cs
- DataGridViewCheckBoxCell.cs
- namescope.cs
- XpsFilter.cs
- UnionExpr.cs
- SqlTransaction.cs
- ObjectStateManagerMetadata.cs
- WebPartDescriptionCollection.cs
- HtmlMeta.cs
- CommandPlan.cs
- ColumnTypeConverter.cs
- CodeExporter.cs
- _ContextAwareResult.cs
- DifferencingCollection.cs
- ManagedWndProcTracker.cs
- Geometry.cs
- DataGridViewBand.cs
- TypeDescriptionProviderAttribute.cs
- FrameworkTextComposition.cs
- RichTextBox.cs
- AccessedThroughPropertyAttribute.cs
- InputLanguageProfileNotifySink.cs
- UTF32Encoding.cs
- ADMembershipProvider.cs
- DBSqlParserTableCollection.cs
- ServiceDescription.cs
- Array.cs
- XsltInput.cs
- FunctionMappingTranslator.cs
- SqlClientWrapperSmiStreamChars.cs
- DataStorage.cs
- XmlElementCollection.cs
- SqlDelegatedTransaction.cs
- NonSerializedAttribute.cs
- ChildTable.cs
- CheckBoxPopupAdapter.cs
- XmlUtil.cs
- TypeDescriptionProvider.cs
- SafeSecurityHandles.cs
- FormsAuthenticationCredentials.cs
- ObjectMemberMapping.cs