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
- OleDbException.cs
- COM2Enum.cs
- RequestFactory.cs
- mansign.cs
- EpmSourcePathSegment.cs
- SqlCharStream.cs
- SortedList.cs
- CompositeTypefaceMetrics.cs
- AvTrace.cs
- DataGridViewColumnCollectionEditor.cs
- SQLByteStorage.cs
- ApplicationFileCodeDomTreeGenerator.cs
- XmlObjectSerializerReadContext.cs
- SwitchLevelAttribute.cs
- RelatedPropertyManager.cs
- CommentEmitter.cs
- QueryExpr.cs
- TraceLog.cs
- ToolStripTextBox.cs
- RecognizedWordUnit.cs
- UnsafeNativeMethods.cs
- ControlValuePropertyAttribute.cs
- StringDictionaryWithComparer.cs
- FormViewDeleteEventArgs.cs
- SecurityHeaderTokenResolver.cs
- PrintPreviewControl.cs
- IUnknownConstantAttribute.cs
- ExpressionValueEditor.cs
- sqlcontext.cs
- storepermission.cs
- SmiEventSink.cs
- RuleRefElement.cs
- PropertyGridDesigner.cs
- ReachBasicContext.cs
- ArgumentNullException.cs
- EllipticalNodeOperations.cs
- OdbcEnvironmentHandle.cs
- Keywords.cs
- BrowserCapabilitiesFactoryBase.cs
- Compress.cs
- Attributes.cs
- SortFieldComparer.cs
- WindowsToolbarItemAsMenuItem.cs
- ActivityPreviewDesigner.cs
- PropertyGridEditorPart.cs
- CalendarDataBindingHandler.cs
- ThicknessAnimationUsingKeyFrames.cs
- LinearGradientBrush.cs
- ListBox.cs
- PropertyChangedEventManager.cs
- ZipIOLocalFileDataDescriptor.cs
- NumericPagerField.cs
- ExtensionSimplifierMarkupObject.cs
- Converter.cs
- SqlProfileProvider.cs
- Int64.cs
- MultiSelectRootGridEntry.cs
- CheckBoxAutomationPeer.cs
- MDIWindowDialog.cs
- ServerProtocol.cs
- PerformanceCounterLib.cs
- CustomBindingCollectionElement.cs
- CodeMemberMethod.cs
- RelationshipWrapper.cs
- FormViewDeleteEventArgs.cs
- ViewKeyConstraint.cs
- ActivityIdHeader.cs
- Decorator.cs
- CommonServiceBehaviorElement.cs
- HttpModuleActionCollection.cs
- SharedPerformanceCounter.cs
- Pts.cs
- SamlConditions.cs
- TextModifier.cs
- _LazyAsyncResult.cs
- ValidationContext.cs
- PageCatalogPart.cs
- ChannelDispatcher.cs
- CodeEventReferenceExpression.cs
- HostProtectionPermission.cs
- MaskInputRejectedEventArgs.cs
- OutOfProcStateClientManager.cs
- DynamicValueConverter.cs
- TaiwanLunisolarCalendar.cs
- HtmlInputHidden.cs
- Transaction.cs
- GridViewDeleteEventArgs.cs
- HttpCacheVaryByContentEncodings.cs
- DefaultAssemblyResolver.cs
- DataGridCommandEventArgs.cs
- Int32AnimationBase.cs
- CultureInfoConverter.cs
- ScrollProviderWrapper.cs
- InternalCache.cs
- WindowsRichEditRange.cs
- ValidatedControlConverter.cs
- TrackingValidationObjectDictionary.cs
- IconHelper.cs
- SecureEnvironment.cs
- PolyQuadraticBezierSegment.cs