Question: Using C# Build a simple WPF app for picking a date and time. a calendar for date selection. a textbox for time display Up and

Using C#

Build a simple WPF app for picking a date and time.

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 a continuous adjustment on 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,

DateTime.Parse Method (String) 4. To adjust time with Up & Down button, 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 property can be useful. TextBox.SelectionStart Property: Gets or sets a character index for the beginning of the current selection.

TextBox.CaretIndex Property: Gets or sets the insertion position index of the caret.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!