Please login to access all of the features of the Community Site.

AnimateProgressCornerRadius

Mobile1.0

A passive animation that changes a CornerRadius property between the From and To values as a tracked value moves.

Properties

PropertyTypeDescription
FromCornerRadiusThe value to use when Progress is at or below Minimum.
ToCornerRadiusThe value to use when Progress is at or above Maximum.
PropertystringThe name of the property to animate.
ProgressdoubleThe current value being tracked.
MinimumdoubleThe lowest value Progress is clamped to. Defaults to 0.
MaximumdoubleThe highest value Progress is clamped to. Defaults to 100.
EasingEasingTypeThe easing curve to use: BounceIn, BounceOut, CubicIn, CubicInOut, CubicOut, Linear, SinIn, SinInOut, SinOut, SpringIn or SpringOut. Defaults to Linear.

Example

Attach the animation to an element’s Behaviors and bind Progress to a value that changes, like a slider’s Value. See Animations for how passive animations work.

<VerticalStackLayout>
    <Slider x:Name="mySlider"
        Minimum="0"
        Maximum="100" />

    <BoxView Color="Blue"
        HeightRequest="100">
        <BoxView.Behaviors>
            <Rock:AnimateProgressCornerRadius Property="CornerRadius"
                From="15,15,5,5"
                To="5,5,15,15"
                Progress="{Binding Path=Value, Source={x:Reference mySlider}}" />
        </BoxView.Behaviors>
    </BoxView>
</VerticalStackLayout>