DoubleAnimation animation = new DoubleAnimation(); animation.From = 0; animation.To = 100; animation.Duration = new Duration(TimeSpan.FromSeconds(2)); // Starting the animation myObject.BeginAnimation(Canvas.LeftProperty, animation);In the above example, we are creating a DoubleAnimation object that animates the position of an object from 0 to 100 over a duration of two seconds. We then call the BeginAnimation method on the object to start the animation on the LeftProperty of the object's Canvas. The package library used for this code sample is likely the System.Windows.Media.Animation library, as it contains the necessary classes for creating and managing animations in a WPF application.