Skip to main content

ICompositionObjectAnimations

Trait ICompositionObjectAnimations 

Source
pub trait ICompositionObjectAnimations {
    // Required methods
    fn try_start_animation(
        &self,
        property_name: &str,
        animation: &dyn ICompositionAnimation,
        final_value: Option<ExpressionVariant>,
    ) -> bool;
    fn get_composition_property(
        &self,
        property_name: &str,
    ) -> Option<&'static CompositionProperty>;
    fn composition_object(&self) -> &CompositionObject;

    // Provided methods
    fn start_animation(
        &self,
        property_name: &str,
        animation: &dyn ICompositionAnimation,
    ) { ... }
    fn start_animation_with_final_value(
        &self,
        property_name: &str,
        animation: &dyn ICompositionAnimation,
        final_value: Option<ExpressionVariant>,
    ) { ... }
    fn stop_animation(&self, property_name: &str) { ... }
    fn start_animation_group(&self, grp: &dyn ICompositionAnimationBase) { ... }
    fn start_animation_group_part(
        &self,
        animation: &dyn ICompositionAnimation,
        target: &str,
        final_value: ExpressionVariant,
    ) -> bool { ... }
    fn start_animation_group_for(
        &self,
        grp: &dyn ICompositionAnimationBase,
        target: &str,
        final_value: ExpressionVariant,
    ) -> bool { ... }
    fn stop_animation_group(&self, grp: &dyn ICompositionAnimationBase) { ... }
}
Expand description

The animation members of CompositionObject, written against the class that embeds one.

Required Methods§

Source

fn try_start_animation( &self, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, ) -> bool

StartAnimation(propertyName, animation, finalValue) of the class: returns false for a property the class does not know.

Source

fn get_composition_property( &self, property_name: &str, ) -> Option<&'static CompositionProperty>

The composition property with the given name.

Source

fn composition_object(&self) -> &CompositionObject

The embedded CompositionObject.

Provided Methods§

Source

fn start_animation( &self, property_name: &str, animation: &dyn ICompositionAnimation, )

Connects an animation with the named property of the object and starts the animation.

Source

fn start_animation_with_final_value( &self, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, )

Source

fn stop_animation(&self, property_name: &str)

Disconnects an animation from the named property and stops it.

Source

fn start_animation_group(&self, grp: &dyn ICompositionAnimationBase)

Starts an animation group. The StartAnimationGroup method on CompositionObject lets you start CompositionAnimationGroup. All the animations in the group will be started at the same time on the object.

Source

fn start_animation_group_part( &self, animation: &dyn ICompositionAnimation, target: &str, final_value: ExpressionVariant, ) -> bool

StartAnimationGroupPart.

Source

fn start_animation_group_for( &self, grp: &dyn ICompositionAnimationBase, target: &str, final_value: ExpressionVariant, ) -> bool

Starts an animation or an animation group triggered by the change of property target to final_value. Returns whether one of the animations targets that property.

Source

fn stop_animation_group(&self, grp: &dyn ICompositionAnimationBase)

Stops an animation group.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ICompositionObjectAnimations for CompositionBitmapCache

Source§

impl ICompositionObjectAnimations for CompositionBrush

Source§

impl ICompositionObjectAnimations for CompositionGradientStop

Source§

impl ICompositionObjectAnimations for CompositionTarget

The class has no animated property: upstream does not override StartAnimation, whose base implementation rejects every property.

Source§

impl ICompositionObjectAnimations for CompositionVisual

Source§

impl ICompositionObjectAnimations for CompositionVisualCollection

The class has no animated property: upstream does not override StartAnimation, whose base implementation rejects every property.