Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C# build a simple WPF app for picking a date and time. Have it include: A calendar for date selection. A textbox for time

In C# build a simple WPF app for picking a date and time. Have it include:

A calendar for date selection.

A textbox for time display.

Up and Down buttons to adjust time. Hours, minutes and AM/PM should be incremented or decremented based on the cursor position. For example, you would want to be able to do continuous adjust minutes when the cursor is placed in the minutes field.

A Select botton that when clicked, should print a message (either in the MainWindow with a textbox, or a Message box) in the following format: Your appointment is on Wednesday, March 2, 2018 at 9:15AM. Its 18 days from today.

1. Use DateTime struct from .NET Class Library to handle date and time.

2. Calendar is a built-in UI element that you can drag from the Toolbox and its ready to use. Use Calendar_SelectedDatesChanged event for date selection.

3. To parse time from textbox, use DateTime.Parse Method (String).

4. To adjust time with Up & Down button, use DateTime.AddHours Method (Double). Similarly for AddMinutes. AM/PM is simply a 12-hour changes.

5. Adjustment of hours, minutes, AM/PM should be based on cursor position. It can be tricky to do the continuously adjustment on hrs/min/am/pm. The following properties can be useful: TextBox.SelectionStart Property, TextBox.CaretIndex Property.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Identify the five major column headings on a work sheet.

Answered: 1 week ago