A lightweight WPF confetti control with burst, cannons, and rain modes.
Add the control to your XAML:
xmlns:confetti="clr-namespace:Wpf.Confetti;assembly=Wpf.Confetti"
<confetti:ConfettiControl x:Name="Confetti"/>Then trigger effects from code:
// One-time burst from center
Confetti.Burst();
// Cannons from both sides
Confetti.Cannons();
// Continuous rain
Confetti.StartRain();
Confetti.StopRain();WpfConfetti includes built-in color palettes via the ConfettiPalette class:
// Default color palette
Confetti.Burst(colors: ConfettiPalette.Default);
// Warm red-orange-gold tones
Confetti.Burst(colors: ConfettiPalette.Fire);
// Cool white-blue-silver tones
Confetti.Burst(colors: ConfettiPalette.Snow);
// High saturation primary colors
Confetti.Burst(colors: ConfettiPalette.Party);| Method | Parameters |
|---|---|
Burst |
amount, position, minSpeed/maxSpeed, minSize/maxSize, minAngle/maxAngle, gravity, colors |
Cannons |
amount, rate, spread, minSpeed/maxSpeed, minSize/maxSize, gravity, colors |
StartRain |
rate, minSpeed/maxSpeed, minSize/maxSize, gravity, colors |
StopRain |
