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

StopConfetti

Mobile7.0

Stops the confetti animation in a Confetti View by turning off its IsAnimationEnabled property. Use it to end a celebration that runs continuously, such as one with an Infinite emitter. Run StartConfetti on the same view to start it again.

The CommandParameter must be a reference to the Rock:ConfettiView to stop, usually set with {x:Reference name}. Any other value is ignored and nothing happens.

Examples

<Grid Rock:Zone.Expands="true">
    <Rock:ConfettiView x:Name="confetti">
        <Rock:ConfettiSystem Colors="Red, White, Blue"
            Emitter="Infinite"
            Shapes="rectangle, circle, star"
            Position="Center" />
    </Rock:ConfettiView>

    <Button Text="Stop Confetti"
        StyleClass="btn, btn-primary"
        VerticalOptions="End"
        Command="{Binding StopConfetti}"
        CommandParameter="{x:Reference confetti}" />
</Grid>

See Confetti View for the confetti systems, shapes and emitters you can configure.