Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
157 lines (135 sloc) 9.6 KB
<Type Name="QuarticEase" FullName="System.Windows.Media.Animation.QuarticEase">
<TypeSignature Language="C#" Value="public class QuarticEase : System.Windows.Media.Animation.EasingFunctionBase" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit QuarticEase extends System.Windows.Media.Animation.EasingFunctionBase" />
<TypeSignature Language="DocId" Value="T:System.Windows.Media.Animation.QuarticEase" />
<TypeSignature Language="VB.NET" Value="Public Class QuarticEase&#xA;Inherits EasingFunctionBase" />
<TypeSignature Language="C++ CLI" Value="public ref class QuarticEase : System::Windows::Media::Animation::EasingFunctionBase" />
<TypeSignature Language="F#" Value="type QuarticEase = class&#xA; inherit EasingFunctionBase" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.Media.Animation.EasingFunctionBase</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents an easing function that creates an animation that accelerates and/or decelerates using the formula *f*(*t*) = *t*<sup>4</sup>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can control whether the animation accelerates, decelerates, or both by specifying the <xref:System.Windows.Media.Animation.EasingFunctionBase.EasingMode%2A>. The following graph below demonstrates the different values of <xref:System.Windows.Media.Animation.EasingFunctionBase.EasingMode%2A>, where *f*(*t*) represents the animation progress and *t* represents time.
![QuarticEase with graphs of different easingmodes.](~/add/media/quarticease-graph.png "QuarticEase with graphs of different easingmodes.")
The formula used for this function is the following.
*f*(*t*) = *t*<sup>4</sup>
> [!NOTE]
> You can use <xref:System.Windows.Media.Animation.PowerEase> to create the same behavior as <xref:System.Windows.Media.Animation.CubicEase>, <xref:System.Windows.Media.Animation.QuadraticEase>, <xref:System.Windows.Media.Animation.QuarticEase>, and <xref:System.Windows.Media.Animation.QuinticEase> by using the <xref:System.Windows.Media.Animation.PowerEase.Power%2A> property. For example, if you want to use <xref:System.Windows.Media.Animation.PowerEase> to substitute for <xref:System.Windows.Media.Animation.CubicEase>, specify a <xref:System.Windows.Media.Animation.PowerEase.Power%2A> value of 3.
There are several other easing functions besides <xref:System.Windows.Media.Animation.QuarticEase>.
In addition to using the easing functions included in the run-time, you can create your own custom easing functions by inheriting from <xref:System.Windows.Media.Animation.EasingFunctionBase>.
## XAML Object Element Usage
```xaml
<QuarticEase .../>
```
## Examples
The following example applies a <xref:System.Windows.Media.Animation.QuarticEase> easing function to a <xref:System.Windows.Media.Animation.DoubleAnimation> to create a decelerating animation.
[!code-xaml[QuarticEase#QuarticEase](~/samples/snippets/csharp/VS_Snippets_Wpf/quarticease/CS/window1.xaml#quarticease)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Media.Animation.PowerEase" />
<altmember cref="T:System.Windows.Media.Animation.BackEase" />
<altmember cref="T:System.Windows.Media.Animation.BounceEase" />
<altmember cref="T:System.Windows.Media.Animation.CircleEase" />
<altmember cref="T:System.Windows.Media.Animation.CubicEase" />
<altmember cref="T:System.Windows.Media.Animation.ElasticEase" />
<altmember cref="T:System.Windows.Media.Animation.ExponentialEase" />
<altmember cref="T:System.Windows.Media.Animation.QuadraticEase" />
<altmember cref="T:System.Windows.Media.Animation.QuinticEase" />
<altmember cref="T:System.Windows.Media.Animation.SineEase" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public QuarticEase ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Media.Animation.QuarticEase.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; QuarticEase();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Media.Animation.QuarticEase" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateInstanceCore">
<MemberSignature Language="C#" Value="protected override System.Windows.Freezable CreateInstanceCore ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Freezable CreateInstanceCore() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Media.Animation.QuarticEase.CreateInstanceCore" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function CreateInstanceCore () As Freezable" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Freezable ^ CreateInstanceCore();" />
<MemberSignature Language="F#" Value="override this.CreateInstanceCore : unit -&gt; System.Windows.Freezable" Usage="quarticEase.CreateInstanceCore " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Freezable</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a new instance of the <see cref="T:System.Windows.Freezable" /> derived class. When creating a derived class, you must override this method.</summary>
<returns>The new instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Animation classes inherit indirectly from <xref:System.Windows.Freezable>. Because of this, you need to override the <xref:System.Windows.Media.Animation.BackEase.CreateInstanceCore%2A> method to construct a custom animation object.
## Examples
The following example shows a typical implementation of <xref:System.Windows.Freezable.CreateInstanceCore%2A>.
[!code-csharp[freezablesample_procedural#CreateInstanceCoreExample](~/samples/snippets/csharp/VS_Snippets_Wpf/freezablesample_procedural/CSharp/freezablesample.cs#createinstancecoreexample)]
[!code-vb[freezablesample_procedural#CreateInstanceCoreExample](~/samples/snippets/visualbasic/VS_Snippets_Wpf/freezablesample_procedural/visualbasic/freezablesample.vb#createinstancecoreexample)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="EaseInCore">
<MemberSignature Language="C#" Value="protected override double EaseInCore (double normalizedTime);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance float64 EaseInCore(float64 normalizedTime) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Media.Animation.QuarticEase.EaseInCore(System.Double)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function EaseInCore (normalizedTime As Double) As Double" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override double EaseInCore(double normalizedTime);" />
<MemberSignature Language="F#" Value="override this.EaseInCore : double -&gt; double" Usage="quarticEase.EaseInCore normalizedTime" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="normalizedTime" Type="System.Double" />
</Parameters>
<Docs>
<param name="normalizedTime">Normalized time (progress) of the animation.</param>
<summary>Provides the logic portion of the easing function that you can override to produce the <see cref="F:System.Windows.Media.Animation.EasingMode.EaseIn" /> mode of the custom easing function.</summary>
<returns>A double that represents the transformed progress.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method transforms normalized time to control the pace of an animation for the <xref:System.Windows.Media.Animation.EasingMode.EaseIn> case of <xref:System.Windows.Media.Animation.EasingFunctionBase.EasingMode%2A>.
You only have to specify your easing function for the <xref:System.Windows.Media.Animation.EasingMode.EaseIn> case because the implementation of the <xref:System.Windows.Media.Animation.EasingFunctionBase.Ease%2A> method transforms `normalizedTime` for the <xref:System.Windows.Media.Animation.EasingMode.EaseOut> and <xref:System.Windows.Media.Animation.EasingMode.EaseInOut> cases.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.