-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ElasticEase.xml
326 lines (286 loc) · 19.3 KB
/
ElasticEase.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<Type Name="ElasticEase" FullName="System.Windows.Media.Animation.ElasticEase">
<TypeSignature Language="C#" Value="public class ElasticEase : System.Windows.Media.Animation.EasingFunctionBase" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ElasticEase extends System.Windows.Media.Animation.EasingFunctionBase" />
<TypeSignature Language="DocId" Value="T:System.Windows.Media.Animation.ElasticEase" />
<TypeSignature Language="VB.NET" Value="Public Class ElasticEase
Inherits EasingFunctionBase" />
<TypeSignature Language="F#" Value="type ElasticEase = class
 inherit EasingFunctionBase" />
<TypeSignature Language="C++ CLI" Value="public ref class ElasticEase : System::Windows::Media::Animation::EasingFunctionBase" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.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 resembles a spring oscillating back and forth until it comes to rest.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can control when in the "spring" behavior occurs in an animation by specifying the <xref:System.Windows.Media.Animation.EasingFunctionBase.EasingMode%2A> property value. The following graph demonstrates the different values of <xref:System.Windows.Media.Animation.EasingFunctionBase.EasingMode%2A>, where *f*(*t*) represents the animation progress and *t* represents time.
![ElasticEase with graphs of different easingmodes.](~/add/media/elasticease-graph.png "ElasticEase with graphs of different easingmodes.")
You can specify how many times the animation oscillates back and forth using the <xref:System.Windows.Media.Animation.ElasticEase.Oscillations%2A> property and how tight the springiness of the oscillations are using the <xref:System.Windows.Media.Animation.ElasticEase.Springiness%2A> property.
> [!NOTE]
> Because this animation causes values to oscillate back and forth, the animation might interpolate into negative numbers unexpectedly. This can cause errors when animating properties that do not allow negative numbers. For example, if you apply this animation to the <xref:System.Windows.FrameworkElement.Height%2A> of an object (e.g. from 0 to 200 with an <xref:System.Windows.Media.Animation.EasingFunctionBase.EasingMode%2A> of <xref:System.Windows.Media.Animation.EasingMode.EaseIn>), the animation will attempt to interpolate through negative numbers for <xref:System.Windows.FrameworkElement.Height%2A> which will throw an error.
There are several other easing functions besides <xref:System.Windows.Media.Animation.ElasticEase>.
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
<ElasticEase .../>
```
## Examples
The following example applies an <xref:System.Windows.Media.Animation.ElasticEase> easing function to a <xref:System.Windows.Media.Animation.DoubleAnimation> to create an animation that resembles a spring oscillating back and forth until it comes to rest.
:::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/ElasticEase/Overview/window1.xaml" id="Snippetelasticease":::
]]></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.ExponentialEase" />
<altmember cref="T:System.Windows.Media.Animation.QuadraticEase" />
<altmember cref="T:System.Windows.Media.Animation.QuarticEase" />
<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 ElasticEase ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Media.Animation.ElasticEase.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 ElasticEase();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<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.ElasticEase" /> 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.ElasticEase.CreateInstanceCore" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function CreateInstanceCore () As Freezable" />
<MemberSignature Language="F#" Value="override this.CreateInstanceCore : unit -> System.Windows.Freezable" Usage="elasticEase.CreateInstanceCore " />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Windows::Freezable ^ CreateInstanceCore();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.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 language="csharp" source="~/snippets/csharp/System.Windows/Freezable/CreateInstanceCore/freezablesample.cs" id="Snippetcreateinstancecoreexample":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/freezablesample_procedural/visualbasic/freezablesample.vb" id="Snippetcreateinstancecoreexample":::
]]></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.ElasticEase.EaseInCore(System.Double)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function EaseInCore (normalizedTime As Double) As Double" />
<MemberSignature Language="F#" Value="override this.EaseInCore : double -> double" Usage="elasticEase.EaseInCore normalizedTime" />
<MemberSignature Language="C++ CLI" Value="protected:
 override double EaseInCore(double normalizedTime);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.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>
<Member MemberName="Oscillations">
<MemberSignature Language="C#" Value="public int Oscillations { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Oscillations" />
<MemberSignature Language="DocId" Value="P:System.Windows.Media.Animation.ElasticEase.Oscillations" />
<MemberSignature Language="VB.NET" Value="Public Property Oscillations As Integer" />
<MemberSignature Language="F#" Value="member this.Oscillations : int with get, set" Usage="System.Windows.Media.Animation.ElasticEase.Oscillations" />
<MemberSignature Language="C++ CLI" Value="public:
 property int Oscillations { int get(); void set(int value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the number of times the target slides back and forth over the animation destination.</summary>
<value>The number of times the target slides back and forth over the animation destination. This value must be greater than or equal to 0. The default is 3.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Dependency property identifier field: <xref:System.Windows.Media.Animation.ElasticEase.OscillationsProperty>
<a name="xamlAttributeUsage_Occilations"></a>
## XAML Attribute Usage
```
<ElasticEase Oscillations="int"/>
```
## Examples
The following example applies an <xref:System.Windows.Media.Animation.ElasticEase> easing function to a <xref:System.Windows.Media.Animation.DoubleAnimation> to create an animation that resembles a spring oscillating back and forth until it comes to rest.
:::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/ElasticEase/Overview/window1.xaml" id="Snippetelasticease":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="OscillationsProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty OscillationsProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty OscillationsProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Media.Animation.ElasticEase.OscillationsProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly OscillationsProperty As DependencyProperty " />
<MemberSignature Language="F#" Value=" staticval mutable OscillationsProperty : System.Windows.DependencyProperty" Usage="System.Windows.Media.Animation.ElasticEase.OscillationsProperty" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ OscillationsProperty;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Media.Animation.ElasticEase.Oscillations" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Springiness">
<MemberSignature Language="C#" Value="public double Springiness { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 Springiness" />
<MemberSignature Language="DocId" Value="P:System.Windows.Media.Animation.ElasticEase.Springiness" />
<MemberSignature Language="VB.NET" Value="Public Property Springiness As Double" />
<MemberSignature Language="F#" Value="member this.Springiness : double with get, set" Usage="System.Windows.Media.Animation.ElasticEase.Springiness" />
<MemberSignature Language="C++ CLI" Value="public:
 property double Springiness { double get(); void set(double value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the stiffness of the spring. The smaller the Springiness value is, the stiffer the spring and the faster the elasticity decreases in intensity over each oscillation.</summary>
<value>A positive number that specifies the stiffness of the spring. The default value is 3.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The smaller the <xref:System.Windows.Media.Animation.ElasticEase.Springiness%2A> value is, the stiffer the spring and the faster the elasticity decreases in intensity over each oscillation.
Dependency property identifier field: <xref:System.Windows.Media.Animation.ElasticEase.SpringinessProperty>
The following diagram illustrates the effect of different values of <xref:System.Windows.Media.Animation.ElasticEase.Springiness%2A>.
![Demonstrates different Springiness values.](~/add/media/elasticease-springiness.png "Demonstrates different Springiness values.")
<a name="xamlAttributeUsage_Springiness"></a>
## XAML Attribute Usage
```
<ElasticEase Springiness="double"/>
```
## Examples
The following example applies an <xref:System.Windows.Media.Animation.ElasticEase> easing function to a <xref:System.Windows.Media.Animation.DoubleAnimation> to create an animation that resembles a spring oscillating back and forth until it comes to rest.
:::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/ElasticEase/Overview/window1.xaml" id="Snippetelasticease":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SpringinessProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty SpringinessProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty SpringinessProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Media.Animation.ElasticEase.SpringinessProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly SpringinessProperty As DependencyProperty " />
<MemberSignature Language="F#" Value=" staticval mutable SpringinessProperty : System.Windows.DependencyProperty" Usage="System.Windows.Media.Animation.ElasticEase.SpringinessProperty" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ SpringinessProperty;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Media.Animation.ElasticEase.Springiness" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>