logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

To try some basic animation by using a Timer.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Purpose: To try some basic animation by using a Timer.

This lab will move an object around the window.  When it hits a side, it will reverse direction.

The object moving around will be a ListBox, Image, TextBox, etc

The user will be able to control (1) The distance it travels, (2) The speed it travels, (3)Stopping and Starting.

 

Design Requirements

1. Create a new C# WPF app, name “MovementAndTimer”.

2. Window must be allowed to be resized.

3. Start button: When clicked, the object starts moving.  Also, the Start button will now say Stop.  This button will toggle between Stop and Start. At start, object moves Left – Right.

4. Step button: When clicked allow object to move in manually. When the movement is working on the timer, this button will be disabled.

5. Exit button: Cause the program to exit.

6. Time Delay Slider control: Min = 200, Max = 2000 milliseconds, Increments = 200 milliseconds.  Every time the slider changes, the logic should change the .interval property of the Timer to the new value.  Init value = 1000 milliseconds.

7. Movement Slider control:  Min = 10, Max = 50, Increment = 10.  Initialize = 20.

 

Logic Requirements

8. Resizing the Window.  If the window gets resized while the object is moving, the moving object shall adjust.

9. Step button will stop the object from moving and allow the user to move the object manually by hitting Step (like the Debug Step function).

10. When the object hits a side of the window it will reverse direction.

 

Coding Considerations

11. Learn to use the Timer control, the DispatcherTimer class.  Google it and look at the sample code.

12. Use the control’s Margin property to find the Top & Left coordinates of the control, and the Height & Width property to find the Bottom & Right.

13. To find the edges of the Window, use the window properties Height & Width properties.

14. The Movement slider tell the code how much to move the control in the -/+ direction.

 

 

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

668 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

799 Answers

Hire Me
expert
Husnain SaeedComputer science

839 Answers

Hire Me
expert
Atharva PatilComputer science

561 Answers

Hire Me