Share via


ViewExtensions Class

Definition

Extension methods for VisualElements, providing animatable scaling, rotation, and layout functions.

public ref class ViewExtensions abstract sealed
public static class ViewExtensions
type ViewExtensions = class
Public Module ViewExtensions
Inheritance
ViewExtensions

Methods

CancelAnimations(VisualElement)

Aborts all animations (e.g. LayoutTo, TranslateTo, ScaleTo, etc.) on the view element.

FadeTo(VisualElement, Double, UInt32, Easing)

Returns a task that performs the fade that is described by the opacity, length, and easing parameters.

InvalidateMeasure(VisualElement)

Layout updates can be forced by app code rather than relying on the built-in layout system behavior. However, that is not generally recommended. Calling InvalidateArrange, InvalidateMeasure or UpdateLayout is usually unnecessary and can cause poor performance if overused. In many situations where app code might be changing layout properties, the layout system will probably already be processing updates asynchronously. The layout system also has optimizations for dealing with cascades of layout changes through parent-child relationships, and forcing layout with app code can work against such optimizations. Nevertheless, it's possible that layout situations exist in more complicated scenarios where forcing layout is the best option for resolving a timing issue or other issue with layout. Just use it deliberately and sparingly.

LayoutTo(VisualElement, Rect, UInt32, Easing) Returns a task that eases the bounds of the VisualElement that is specified by the view to the rectangle that is specified by the bounds parameter.
RelRotateTo(VisualElement, Double, UInt32, Easing)

Rotates the VisualElement that is specified by view from its current rotation by drotation.

RelScaleTo(VisualElement, Double, UInt32, Easing)

Returns a task that scales the VisualElement that is specified by view from its current scale to dscale.

RotateTo(VisualElement, Double, UInt32, Easing)

Returns a task that rotates the VisualElement that is specified by view that is described by the rotation, length, and easing parameters.

RotateXTo(VisualElement, Double, UInt32, Easing)

Returns a task that skews the X axis of the the VisualElement that is specified by view by rotation, taking time length and using easing.

RotateYTo(VisualElement, Double, UInt32, Easing)

Returns a task that skews the Y axis of the the VisualElement that is specified by view by rotation, taking time length and using easing.

ScaleTo(VisualElement, Double, UInt32, Easing)

Returns a task that scales the VisualElement that is specified by view to the absolute scale factor scale.

ScaleXTo(VisualElement, Double, UInt32, Easing)

Returns a task that scales the X axis of the the VisualElement that is specified by view to the absolute scale factor scale.

ScaleYTo(VisualElement, Double, UInt32, Easing)

Returns a task that scales the Y axis of the the VisualElement that is specified by view to the absolute scale factor scale.

TranslateTo(VisualElement, Double, Double, UInt32, Easing)

Animates an elements TranslationX and TranslationY properties from their current values to the new values. This ensures that the input layout is in the same position as the visual layout.

Applies to