Quick Start Tutorial: Creating Universal Apps Via Xamarin: Date Picker, Time Picker and Activity Indicator - Part Nine

Read the previous parts of the series here,

DatePicker

This control is used to select only the date .

Properties

  1. Date
  2. Minimum Date
  3. Maximum Date
  4. DateSelected is event

Date property

By default this property has today's date, we can assign the default date if it is required .

Minimum Date and  Maximum Date

This property is a validation property to set the minimum and maximum date of the calendar.  If this property has been set, the control displays the date only based on the Minimum & Maximum date. Other dates are hidden and set the minimum date; the calendar Date property gets overwritten.

Date Selected event

This is the event trigger when the date has been selected in the calendar control.

Example





Example

Minimum & Maximum Date validation.





Click the “Right Symbol” button, and the Date Selected event gets fired.



Time Picker

Time Picker is the control used to select the time and there is no specific event to trigger when the time has been selected by the user; to handle this situation either use Property Changed or Property Changing event.

Example



Click the Done button; the OnPropertyChanged event is fired.



Activity Indicator

This control is used to display ongoing tasks in the progress state (loading state).

Properties

Is Running

If true animation will start, and if false it will stop.



Note

If UWP program IsRunning property is not working (Known issue: Microsoft will fix this issue) a workaround to use is  the IsVisible property.

Example

Up Next
    Ebook Download
    View all
    Learn
    View all