Skip to content

Commit

Permalink
Document return values for animation extensions (#17627)
Browse files Browse the repository at this point in the history
  • Loading branch information
hartez authored Sep 25, 2023
1 parent 36700a8 commit 5c9437b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Controls/src/Core/ViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void UpdateProperty(double f)
/// <param name="opacity">The opacity to fade to.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> FadeTo(this VisualElement view, double opacity, uint length = 250, Easing? easing = null)
{
Expand All @@ -83,6 +84,7 @@ public static Task<bool> FadeTo(this VisualElement view, double opacity, uint le
/// <param name="bounds">The layout bounds.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> LayoutTo(this VisualElement view, Rect bounds, uint length = 250, Easing? easing = null)
{
Expand Down Expand Up @@ -110,6 +112,7 @@ public static Task<bool> LayoutTo(this VisualElement view, Rect bounds, uint len
/// <param name="drotation">The relative rotation.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> RelRotateTo(this VisualElement view, double drotation, uint length = 250, Easing? easing = null)
{
Expand All @@ -127,6 +130,7 @@ public static Task<bool> RelRotateTo(this VisualElement view, double drotation,
/// <param name="dscale">The relative scale.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> RelScaleTo(this VisualElement view, double dscale, uint length = 250, Easing? easing = null)
{
Expand All @@ -144,6 +148,7 @@ public static Task<bool> RelScaleTo(this VisualElement view, double dscale, uint
/// <param name="rotation">The final rotation value.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> RotateTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null)
{
Expand All @@ -161,6 +166,7 @@ public static Task<bool> RotateTo(this VisualElement view, double rotation, uint
/// <param name="rotation">The final rotation value.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> RotateXTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null)
{
Expand All @@ -178,6 +184,7 @@ public static Task<bool> RotateXTo(this VisualElement view, double rotation, uin
/// <param name="rotation">The final rotation value.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> RotateYTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null)
{
Expand All @@ -194,6 +201,7 @@ public static Task<bool> RotateYTo(this VisualElement view, double rotation, uin
/// <param name="scale">The final absolute scale.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> ScaleTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null)
{
Expand All @@ -211,6 +219,7 @@ public static Task<bool> ScaleTo(this VisualElement view, double scale, uint len
/// <param name="scale">The final absolute scale.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> ScaleXTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null)
{
Expand All @@ -228,6 +237,7 @@ public static Task<bool> ScaleXTo(this VisualElement view, double scale, uint le
/// <param name="scale">The final absolute scale.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> ScaleYTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null)
{
Expand All @@ -246,6 +256,7 @@ public static Task<bool> ScaleYTo(this VisualElement view, double scale, uint le
/// <param name="y">The y component of the final translation vector.</param>
/// <param name="length">The time, in milliseconds, over which to animate the transition. The default is 250.</param>
/// <param name="easing">The easing function to use for the animation.</param>
/// <returns>A <see cref="Task"/> containing a <see cref="bool"/> value which indicates whether the animation was canceled. <see langword="true"/> indicates that the animation was canceled. <see langword="false"/> indicates that the animation ran to completion.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="view"/> is <see langword="null"/>.</exception>
public static Task<bool> TranslateTo(this VisualElement view, double x, double y, uint length = 250, Easing? easing = null)
{
Expand Down

0 comments on commit 5c9437b

Please sign in to comment.