Migrate from Xamarin.Forms SfTimePicker to .NET MAUI SfTimePicker
21 Aug 20246 minutes to read
To make the migration from the Xamarin SfTimePicker to .NET MAUI SfTimePicker easier, most of the APIs from the Xamarin SfTimePicker are kept in the .NET MAUI SfTimePicker. However, to maintain the consistency of API naming in the .NET MAUI SfTimePicker, some of the APIs have been renamed. Please find the difference in the following topics.
Namespaces
Xamarin SfTimePicker | .NET MAUI SfTimePicker |
---|---|
Syncfusion.XForms.Pickers | Syncfusion.Maui.Picker |
Initialize control
To initialize the control, import the time picker namespace and initialize SfTimePicker
as shown in the following code sample.
Xamarin SfTimePicker | .NET MAUI SfTimePicker |
---|---|
|
|
Classes
Xamarin SfTimePicker | .NET MAUI SfTimePicker | Description |
---|---|---|
Represents a base used to achieve the time picker custom view. | ||
Represents a class which is used to hold the selection changed event details. |
Properties
SfTimePicker
The following code example, explains how to initialize the properties of the Xamarin SfTimePicker
and .NET MAUI SfTimePicker
class.
Xamarin SfTimePicker | .NET MAUI SfTimePicker |
---|---|
|
|
Xamarin SfTimePicker | .NET MAUI SfTimePicker | Description |
---|---|---|
Gets or sets a command to decline a selected time value of SfTimePicker. | ||
Nil | Not Supported. | |
Gets or set the format that is used to change the format of SfTimePicker. | ||
Text(From PickerHeaderView) |
Gets or sets the header text to change the text of the header. | |
Gets or sets the hour header text to change the hour column header. | ||
Gets or sets the hour interval to restrict the visible hours. | ||
Gets or sets the meridiem header text to change the meridiem column header. | ||
Gets or sets the minute interval to restrict the visible minutes. | ||
Gets or sets the hour header text to change the hour column header. | ||
Gets or sets a command to accept a selected time value of SfTimePicker. | ||
Gets or sets the second interval to restrict the visible seconds. | ||
Gets or sets the hour header text to change the hour column header. | ||
Gets or sets the selected time to select the particular time of the time picker. |
PickerBase
Xamarin SfTimePicker | .NET MAUI SfTimePicker | Description |
---|---|---|
Nil | Not Supported. | |
Nil | Not Supported. | |
Gets or sets the background color of the footer. | ||
TextColor(From TextStyle of PickerFooterView) |
Gets or sets the text color of the text style. | |
Gets or sets the background color of the column header. | ||
FontAttributes(From TextStyle of TimePickerColumnHeaderView) |
Gets or sets the font attribute of the column header text style. | |
Gets or sets the font family of the column header text style. | ||
FontSize(From TextStyle of TimePickerColumnHeaderView) |
Gets or sets the font size of the column header text style. | |
Gets or sets the height of the column header. | ||
TextColor(From TextStyle of TimePickerColumnHeaderView) |
Gets or sets the text color of the column header text style. | |
Nil | Not Supported. | |
Height(From PickerFooterView) |
Gets or sets the height of the footer view. | |
Gets or sets the value of footer view. This property can be used to customize the Footer in Time Picker. | ||
Gets or sets the background color of the header. | ||
FontAttribute(From TextStyle of PickerHeaderView) |
Gets or sets the font attribute of the header text style. | |
FontFamily(From TextStyle of PickerHeaderView) |
Gets or sets the font family of the header text style. | |
FontSize(From TextStyle of PickerHeaderView) |
Gets or sets the font size of the header text style. | |
Height(From PickerHeaderView) |
Gets or sets the height of the header. | |
TextColor(From TextStyle of PickerHeaderView) |
Gets or sets the text color of the header text style. | |
Gets or sets the value of header view. This property can be used to customize the header in Time Picker. | ||
Gets or sets the open to allow the dialog mode. | ||
Gets or sets the item height of each item source. | ||
Gets or sets the background color of the footer. | ||
TextColor(From TextStyle of PickerFooterView) |
Gets or sets the text color of the text style. | |
Nil | Not Supported. | |
Nil | Not Supported. | |
Gets or sets the background color of the selected item. | ||
FontAttributes(From SelectedTextStyle of PickerBase) |
Gets or sets the font attribute of the selected text style. | |
FontFamily(From SelectedTextStyle of PickerBase) |
Gets or sets the font family of the selected text style. | |
FontSize(From SelectedTextStyle of PickerBase) |
Gets or sets the font size of the selected text style. | |
TextColor(From SelectedTextStyle of PickerBase) |
Gets or sets the text color of the selected text style. | |
Nil | Not Supported. | |
Nil | Not Supported. | |
Nil | Not Supported. | |
FontAttributes(From TextStyle of PickerBase) |
Gets or sets the font attributes of the unselected text style.. | |
FontFamily(From TextStyle of PickerBase) |
Gets or sets the font family of the unselected text style.. | |
FontSize(From TextStyle of PickerBase) |
Gets or sets the font size of the unselected text style.. | |
TextColor(From TextStyle of PickerBase) |
Gets or sets the text color of the unselected text style.. |
Enums
Xamarin SfTimePicker | .NET MAUI SfTimePicker | Description |
---|---|---|
Defines the time format for the time picker. | ||
Defines the mode of the time picker. |
Events
Xamarin SfTimePicker | .NET MAUI SfTimePicker | Description |
---|---|---|
Occurs whenever the opened on the time picker. | ||
Occurs whenever the closed on the time picker. | ||
Occurs whenever the closing on the time picker. | ||
Occurs whenever the selection changed on the time picker. | ||
Occurs whenever the footer ok button is clicked in the time picker. | ||
Occurs whenever the footer cancel button is clicked in the time picker. |
Upcoming Features
- Enable looping support.