Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / Animation / PowerEase.cs / 1305600 / PowerEase.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation, 2008 // // File: PowerEase.cs //----------------------------------------------------------------------------- namespace System.Windows.Media.Animation { ////// This class implements an easing function that gives a polynomial curve of arbitrary degree. /// If the curve you desire is cubic, quadratic, quartic, or quintic it is better to use the /// specialized easing functions. /// public class PowerEase : EasingFunctionBase { public PowerEase() { } ////// Power Property /// public static readonly DependencyProperty PowerProperty = DependencyProperty.Register( "Power", typeof(double), typeof(PowerEase), new PropertyMetadata(2.0)); ////// Specifies the power for the polynomial equation. /// public double Power { get { return (double)GetValue(PowerProperty); } set { SetValueInternal(PowerProperty, value); } } protected override double EaseInCore(double normalizedTime) { double power = Math.Max(0.0, Power); return Math.Pow(normalizedTime, power); } protected override Freezable CreateInstanceCore() { return new PowerEase(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation, 2008 // // File: PowerEase.cs //----------------------------------------------------------------------------- namespace System.Windows.Media.Animation { ////// This class implements an easing function that gives a polynomial curve of arbitrary degree. /// If the curve you desire is cubic, quadratic, quartic, or quintic it is better to use the /// specialized easing functions. /// public class PowerEase : EasingFunctionBase { public PowerEase() { } ////// Power Property /// public static readonly DependencyProperty PowerProperty = DependencyProperty.Register( "Power", typeof(double), typeof(PowerEase), new PropertyMetadata(2.0)); ////// Specifies the power for the polynomial equation. /// public double Power { get { return (double)GetValue(PowerProperty); } set { SetValueInternal(PowerProperty, value); } } protected override double EaseInCore(double normalizedTime) { double power = Math.Max(0.0, Power); return Math.Pow(normalizedTime, power); } protected override Freezable CreateInstanceCore() { return new PowerEase(); } } } // 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
- TCPClient.cs
- DataFieldCollectionEditor.cs
- KeyInterop.cs
- XmlQueryTypeFactory.cs
- WebPartDisplayModeCollection.cs
- CommandHelpers.cs
- ProtectedConfigurationSection.cs
- ListViewCommandEventArgs.cs
- XmlSchemaSet.cs
- LineBreak.cs
- DataGridViewCheckBoxColumn.cs
- XmlRawWriter.cs
- XmlProcessingInstruction.cs
- COSERVERINFO.cs
- EntityDataSourceEntityTypeFilterItem.cs
- DropShadowEffect.cs
- SymbolPair.cs
- JulianCalendar.cs
- SafeFileHandle.cs
- DataGridPageChangedEventArgs.cs
- ListViewInsertionMark.cs
- BooleanExpr.cs
- HttpClientCertificate.cs
- TransportationConfigurationTypeInstallComponent.cs
- DPTypeDescriptorContext.cs
- MetadataItemCollectionFactory.cs
- SecurityUtils.cs
- DisplayInformation.cs
- MaskedTextProvider.cs
- RemotingAttributes.cs
- ComContractElement.cs
- EndOfStreamException.cs
- DeploymentSection.cs
- ElementHost.cs
- GeometryDrawing.cs
- TextWriter.cs
- UnsafeMethods.cs
- XmlAutoDetectWriter.cs
- WebRequestModuleElementCollection.cs
- SafeMemoryMappedFileHandle.cs
- CodeParameterDeclarationExpression.cs
- WebPartDescriptionCollection.cs
- CustomValidator.cs
- ProcessHostServerConfig.cs
- coordinatorscratchpad.cs
- TransformerTypeCollection.cs
- XamlPoint3DCollectionSerializer.cs
- controlskin.cs
- PublisherMembershipCondition.cs
- Scanner.cs
- DbCommandTree.cs
- ZipIOExtraFieldZip64Element.cs
- ResourceProviderFactory.cs
- XsltCompileContext.cs
- ToolBar.cs
- NavigationWindowAutomationPeer.cs
- EventLog.cs
- XmlChildEnumerator.cs
- MonthCalendar.cs
- LayoutManager.cs
- EmissiveMaterial.cs
- CodeAttributeDeclaration.cs
- Error.cs
- VirtualDirectoryMapping.cs
- Geometry.cs
- CommandSet.cs
- SecurityUtils.cs
- RelationshipWrapper.cs
- CompilerScope.cs
- Switch.cs
- ResourceDescriptionAttribute.cs
- TextTreeTextNode.cs
- EventLogPermissionEntryCollection.cs
- XamlTemplateSerializer.cs
- FlowDocumentReaderAutomationPeer.cs
- BoolLiteral.cs
- DecimalConverter.cs
- OAVariantLib.cs
- DynamicPropertyHolder.cs
- ApplicationTrust.cs
- DbTransaction.cs
- StoreContentChangedEventArgs.cs
- SecurityDescriptor.cs
- NativeActivity.cs
- AtlasWeb.Designer.cs
- JobDuplex.cs
- ListViewDataItem.cs
- Slider.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- ButtonFlatAdapter.cs
- ExternalFile.cs
- BitVec.cs
- X509CertificateCollection.cs
- Italic.cs
- EventRoute.cs
- EncoderReplacementFallback.cs
- FormViewDeleteEventArgs.cs
- MetadataArtifactLoaderResource.cs
- AuthenticationModuleElementCollection.cs
- LineVisual.cs