Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Encoding.cs
- NumberAction.cs
- PersonalizationProviderCollection.cs
- Accessible.cs
- LinearKeyFrames.cs
- WebZone.cs
- AppDomainEvidenceFactory.cs
- TextDecorations.cs
- TemplateKeyConverter.cs
- UIElement3DAutomationPeer.cs
- SchemaName.cs
- SingleConverter.cs
- HtmlInputReset.cs
- AttributeCallbackBuilder.cs
- BadImageFormatException.cs
- ReadOnlyDataSource.cs
- EnumerableRowCollectionExtensions.cs
- RawStylusInputCustomData.cs
- WorkflowTransactionService.cs
- XPathNodeHelper.cs
- Bold.cs
- RegexCode.cs
- SingleConverter.cs
- ToolStripItemClickedEventArgs.cs
- BrowsableAttribute.cs
- BuildProviderCollection.cs
- RepeaterItemCollection.cs
- ComponentGuaranteesAttribute.cs
- DataViewListener.cs
- querybuilder.cs
- LayoutSettings.cs
- OleDbRowUpdatingEvent.cs
- RefType.cs
- ChameleonKey.cs
- AspNetCompatibilityRequirementsMode.cs
- Timer.cs
- GeneratedCodeAttribute.cs
- TCEAdapterGenerator.cs
- TypeListConverter.cs
- FixedTextPointer.cs
- ErrorFormatterPage.cs
- PromptEventArgs.cs
- DrawingGroup.cs
- ModifiableIteratorCollection.cs
- ValueExpressions.cs
- HttpProtocolImporter.cs
- DataSource.cs
- HandlerWithFactory.cs
- LinkDescriptor.cs
- LockRecursionException.cs
- ControlLocalizer.cs
- NativeCompoundFileAPIs.cs
- UserUseLicenseDictionaryLoader.cs
- DataGridrowEditEndingEventArgs.cs
- XmlValueConverter.cs
- XmlSchemaComplexContent.cs
- KeySpline.cs
- CompareInfo.cs
- SchemaElementDecl.cs
- ScrollProperties.cs
- WindowHelperService.cs
- UriTemplateLiteralPathSegment.cs
- RowCache.cs
- SystemException.cs
- storepermissionattribute.cs
- TitleStyle.cs
- cache.cs
- ClientBuildManagerCallback.cs
- TransactionValidationBehavior.cs
- LoadWorkflowByInstanceKeyCommand.cs
- TabOrder.cs
- EncoderExceptionFallback.cs
- CodeConstructor.cs
- WebBrowserProgressChangedEventHandler.cs
- ProfileGroupSettingsCollection.cs
- ToolBarPanel.cs
- SecurityUtils.cs
- CopyNamespacesAction.cs
- InvokeProviderWrapper.cs
- Int16Converter.cs
- SqlHelper.cs
- Privilege.cs
- WebRequestModuleElement.cs
- WS2007FederationHttpBindingElement.cs
- CryptoStream.cs
- ModuleBuilderData.cs
- WindowsFormsHostPropertyMap.cs
- ContextConfiguration.cs
- ProgressBar.cs
- SqlProviderManifest.cs
- XmlDataProvider.cs
- IPeerNeighbor.cs
- LinqDataSourceDeleteEventArgs.cs
- TreeNode.cs
- ChangeTracker.cs
- XhtmlBasicObjectListAdapter.cs
- ProviderConnectionPoint.cs
- SQLDouble.cs
- MultiDataTrigger.cs
- DBSchemaRow.cs