Class PickerBase
Class that represents and render the picker control,
Implements
Inherited Members
Namespace: Syncfusion.Maui.Picker
Assembly: Syncfusion.Maui.Picker.dll
Syntax
public abstract class PickerBase : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IPicker, IPickerView, IColumnHeaderView, IFooterView, IHeaderView, IPickerCommon
Constructors
PickerBase()
Declaration
protected PickerBase()
Fields
AcceptCommandProperty
Identifies the AcceptCommand dependency property.
Declaration
public static readonly BindableProperty AcceptCommandProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for AcceptCommand dependency property. |
CloseButtonIconProperty
Identifies the CloseButtonIcon bindable property.
Declaration
public static readonly BindableProperty CloseButtonIconProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for CloseButtonIcon bindable property. |
ColumnDividerColorProperty
Identifies the ColumnDividerColor dependency property.
Declaration
public static readonly BindableProperty ColumnDividerColorProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for ColumnDividerColor dependency property. |
ColumnHeaderTemplateProperty
Identifies the ColumnHeaderTemplate dependency property.
Declaration
public static readonly BindableProperty ColumnHeaderTemplateProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for ColumnHeaderTemplate dependency property. |
DayColumnTextStyleProperty
Identifies the DayColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty DayColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for DayColumnTextStyle dependency property. |
DayColumnWidthProperty
Identifies the DayColumnWidth dependency property.
Declaration
public static readonly BindableProperty DayColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for DayColumnWidth dependency property. |
DeclineCommandProperty
Identifies the DeclineCommand dependency property.
Declaration
public static readonly BindableProperty DeclineCommandProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for DeclineCommand dependency property. |
EnableLiquidGlassEffectProperty
Identifies the EnableLiquidGlassEffect property. It indicates whether the Liquid Effect is enabled for SfPicker or not.
Declaration
public static readonly BindableProperty EnableLiquidGlassEffectProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
EnableLoopingProperty
Identifies the EnableLoopingProperty dependency property.
Declaration
public static readonly BindableProperty EnableLoopingProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for EnableLoopingProperty dependency property. |
FooterTemplateProperty
Identifies the FooterTemplate dependency property.
Declaration
public static readonly BindableProperty FooterTemplateProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for FooterTemplate dependency property. |
FooterViewProperty
Identifies the FooterView dependency property.
Declaration
public static readonly BindableProperty FooterViewProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for FooterView dependency property. |
HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
Declaration
public static readonly BindableProperty HeaderTemplateProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for HeaderTemplate dependency property. |
HourColumnTextStyleProperty
Identifies the HourColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty HourColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for HourColumnTextStyle dependency property. |
HourColumnWidthProperty
Identifies the HourColumnWidth dependency property.
Declaration
public static readonly BindableProperty HourColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for HourColumnWidth dependency property. |
IsOpenProperty
Identifies the IsOpen dependency property.
Declaration
public static readonly BindableProperty IsOpenProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for IsOpen dependency property. |
IsSelectionImmediateProperty
Identifies the IsSelectionImmediate dependency property.
Declaration
public static readonly BindableProperty IsSelectionImmediateProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for IsSelectionImmediate dependency property. |
ItemHeightProperty
Identifies the ItemHeight dependency property.
Declaration
public static readonly BindableProperty ItemHeightProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for ItemHeight dependency property. |
MeridiemColumnTextStyleProperty
Identifies the MeridiemColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty MeridiemColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MeridiemColumnTextStyle dependency property. |
MeridiemColumnWidthProperty
Identifies the MeridiemColumnWidth dependency property.
Declaration
public static readonly BindableProperty MeridiemColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MeridiemColumnWidth dependency property. |
MilliSecondColumnTextStyleProperty
Identifies the MilliSecondColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty MilliSecondColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MilliSecondColumnTextStyle dependency property. |
MilliSecondColumnWidthProperty
Identifies the MilliSecondColumnWidth dependency property.
Declaration
public static readonly BindableProperty MilliSecondColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MilliSecondColumnWidth dependency property. |
MinuteColumnTextStyleProperty
Identifies the MinuteColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty MinuteColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MinuteColumnTextStyle dependency property. |
MinuteColumnWidthProperty
Identifies the MinuteColumnWidth dependency property.
Declaration
public static readonly BindableProperty MinuteColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MinuteColumnWidth dependency property. |
ModeProperty
Identifies the Mode dependency property.
Declaration
public static readonly BindableProperty ModeProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for Mode dependency property. |
MonthColumnTextStyleProperty
Identifies the MonthColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty MonthColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MonthColumnTextStyle dependency property. |
MonthColumnWidthProperty
Identifies the MonthColumnWidth dependency property.
Declaration
public static readonly BindableProperty MonthColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MonthColumnWidth dependency property. |
PopupHeightProperty
Identifies the PopupHeightProperty dependency property.
Declaration
public static readonly BindableProperty PopupHeightProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for PopupHeightProperty dependency property. |
PopupWidthProperty
Identifies the PopupWidthProperty dependency property.
Declaration
public static readonly BindableProperty PopupWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for PopupWidthProperty dependency property. |
RelativePositionProperty
Identifies the RelativePosition dependency property.
Declaration
public static readonly BindableProperty RelativePositionProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for RelativePosition dependency property. |
RelativeViewProperty
Identifies the RelativeView dependency property.
Declaration
public static readonly BindableProperty RelativeViewProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for RelativeView dependency property. |
SecondColumnTextStyleProperty
Identifies the SecondColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty SecondColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for SecondColumnTextStyle dependency property. |
SecondColumnWidthProperty
Identifies the SecondColumnWidth dependency property.
Declaration
public static readonly BindableProperty SecondColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for SecondColumnWidth dependency property. |
SelectedTextStyleProperty
Identifies the SelectedTextStyle dependency property.
Declaration
public static readonly BindableProperty SelectedTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for SelectedTextStyle dependency property. |
SelectionViewProperty
Identifies the SelectionView dependency property.
Declaration
public static readonly BindableProperty SelectionViewProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for SelectionView dependency property. |
ShowCloseButtonProperty
Identifies the ShowCloseButton bindable property.
Declaration
public static readonly BindableProperty ShowCloseButtonProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for ShowCloseButton bindable property. |
TextDisplayModeProperty
Identifies the TextDisplayMode dependency property.
Declaration
public static readonly BindableProperty TextDisplayModeProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for TextDisplayMode dependency property. |
TextStyleProperty
Identifies the TextStyle dependency property.
Declaration
public static readonly BindableProperty TextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for TextStyle dependency property. |
YearColumnTextStyleProperty
Identifies the YearColumnTextStyle dependency property.
Declaration
public static readonly BindableProperty YearColumnTextStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for YearColumnTextStyle dependency property. |
YearColumnWidthProperty
Identifies the YearColumnWidth dependency property.
Declaration
public static readonly BindableProperty YearColumnWidthProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for YearColumnWidth dependency property. |
Properties
AcceptCommand
Gets or sets the picker ok button clicked command.
Declaration
public ICommand AcceptCommand { get; set; }
Property Value
| Type |
|---|
| System.Windows.Input.ICommand |
CloseButtonIcon
Gets or sets the icon that should be rendered inside the picker close button.
Declaration
public ImageSource CloseButtonIcon { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.ImageSource |
ColumnDividerColor
Gets or sets the value of column divider color in SfPicker. This property can be used to customize the column divider color in Picker.
Declaration
public Color ColumnDividerColor { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Graphics.Color |
ColumnHeaderTemplate
Gets or sets the column header template or template selector for picker column header.
Declaration
public DataTemplate ColumnHeaderTemplate { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.DataTemplate |
Remarks
The BindingContext of the ColumnHeaderTemplate is respective picker control. When using column header template, the column header style customization will not be applicable.
DayColumnTextStyle
Gets or sets the text style for picker day column.
Declaration
public PickerTextStyle DayColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the day column textstyle property for the sfdatepicker.
<picker:SfDatePicker >
<picker:SfDatePicker.DayColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfDatePicker.DayColumnTextStyle>
</picker:SfDatePicker>
DayColumnWidth
Gets or sets the width for picker day column.
Declaration
public double DayColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This day column width applicable for SfDatepicker and SfDateTimePicker only.
Examples
The below example shows how to set the day column width property for the sfdatepicker.
DeclineCommand
Gets or sets the picker cancel button clicked command.
Declaration
public ICommand DeclineCommand { get; set; }
Property Value
| Type |
|---|
| System.Windows.Input.ICommand |
EnableLiquidGlassEffect
Gets or sets a value indicating whether the liquid glass effect is enabled for the SfPicker.
Declaration
public bool EnableLiquidGlassEffect { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
EnableLooping
Gets or sets a value indicating whether the picker can perform looping.
Declaration
public bool EnableLooping { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
FooterTemplate
Gets or sets the footer template or template selector for picker footer.
Declaration
public DataTemplate FooterTemplate { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.DataTemplate |
Remarks
The BindingContext of the FooterTemplate is respective picker control. When using footer template, the footer style customization will not be applicable.
FooterView
Gets or sets the value of footer view. This property can be used to customize the Footer in Picker.
Declaration
public PickerFooterView FooterView { get; set; }
Property Value
| Type |
|---|
| PickerFooterView |
HeaderTemplate
Gets or sets the header template or template selector for picker header
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.DataTemplate |
Remarks
The BindingContext of the HeaderTemplate is respective picker control. When using header template, the header style customization will not be applicable.
HourColumnTextStyle
Gets or sets the text style for picker hour column.
Declaration
public PickerTextStyle HourColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the hour column textstyle property for the sftimepicker.
<picker:SfTimePicker >
<picker:SfTimePicker.HourColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfTimePicker.HourColumnTextStyle>
</picker:SfTimePicker>
HourColumnWidth
Gets or sets the width for picker hour column.
Declaration
public double HourColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This hour column width applicable for SfTimepicker and SfDateTimePicker only.
Examples
The below example shows how to set the hour column width property for the sftimepicker.
IsOpen
Gets or sets a value indicating whether the picker is open or not.
Declaration
public bool IsOpen { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsSelectionImmediate
Gets or sets a value indicating whether the user must explicitly confirm
the selection made in the picker when it is displayed in a dialog or relative dialog mode.
When this property is set to true, the picker requires an explicit
confirmation action such as tapping an OK button before the selected value is committed.
When this property is set to false, the selection is committed
immediately as the user interacts with the picker (for example, when scrolling or tapping items).
This property has no effect when the picker is displayed in default mode.
Declaration
public bool IsSelectionImmediate { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ItemHeight
Gets or sets the value to specify the item height of picker view on Picker.
Declaration
public double ItemHeight { get; set; }
Property Value
| Type |
|---|
| System.Double |
MeridiemColumnTextStyle
Gets or sets the text style for picker meridiem column.
Declaration
public PickerTextStyle MeridiemColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the meridiem column textstyle property for the sftimepicker.
<picker:SfTimePicker >
<picker:SfTimePicker.MeridiemColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfTimePicker.MeridiemColumnTextStyle>
</picker:SfTimePicker>
MeridiemColumnWidth
Gets or sets the width for picker meridiem column.
Declaration
public double MeridiemColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This day column width applicable for SfTimepicker and SfDateTimePicker only.
Examples
The below example shows how to set the meridiem column width property for the sftimepicker.
MilliSecondColumnTextStyle
Gets or sets the text style for picker milli seconds column.
Declaration
public PickerTextStyle MilliSecondColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the milli seconds column textstyle property for the sftimepicker.
<picker:SfTimePicker >
<picker:SfTimePicker.MilliSecondColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfTimePicker.MilliSecondColumnTextStyle>
</picker:SfTimePicker>
MilliSecondColumnWidth
Gets or sets the width for picker milli second column.
Declaration
public double MilliSecondColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This millisecond column width applicable for SfTimepicker and SfDateTimePicker only.
Examples
The below example shows how to set the mill seconds column width property for the sftimepicker.
MinuteColumnTextStyle
Gets or sets the text style for picker minute column.
Declaration
public PickerTextStyle MinuteColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the minute column textstyle property for the sftimepicker.
<picker:SfTimePicker >
<picker:SfTimePicker.MinuteColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfTimePicker.MinuteColumnTextStyle>
</picker:SfTimePicker>
MinuteColumnWidth
Gets or sets the width for picker minute column.
Declaration
public double MinuteColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This minute column width applicable for SfTimepicker and SfDateTimePicker only.
Examples
The below example shows how to set the minute column width property for the sftimepicker.
Mode
Gets or sets the mode of the picker.
Declaration
public PickerMode Mode { get; set; }
Property Value
| Type |
|---|
| PickerMode |
MonthColumnTextStyle
Gets or sets the text style for picker month column.
Declaration
public PickerTextStyle MonthColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the month column textstyle property for the sfdatepicker.
<picker:SfDatePicker >
<picker:SfDatePicker.MonthColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfDatePicker.MonthColumnTextStyle>
</picker:SfDatePicker>
MonthColumnWidth
Gets or sets the width for picker month column.
Declaration
public double MonthColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This month column width applicable for SfDatepicker and SfDateTimePicker only.
Examples
The below example shows how to set the month column width property for the sfdatepicker.
PopupHeight
Gets or sets the height of the popup in the picker.
Declaration
public double PopupHeight { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
The default height of the popup will be the addition of header height, column header height, picker items' five items height, and footer height.
PopupWidth
Gets or sets the width of the popup in the picker.
Declaration
public double PopupWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
The default width of the popup will be the addition of picker column width.
RelativePosition
Gets or sets the relative position of the picker popup.
Declaration
public PickerRelativePosition RelativePosition { get; set; }
Property Value
| Type |
|---|
| PickerRelativePosition |
RelativeView
Gets or sets the view relative to which the picker dialog should be displayed based on the RelativePosition. RelativePosition
Declaration
public View RelativeView { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.View |
Remarks
It is only applicable for RelativeDialog mode. If no relative view is given, the picker base will be set as the relative view.
SecondColumnTextStyle
Gets or sets the text style for picker seconds column.
Declaration
public PickerTextStyle SecondColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the second column textstyle property for the sftimepicker.
<picker:SfTimePicker >
<picker:SfTimePicker.SecondColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfTimePicker.SecondColumnTextStyle>
</picker:SfTimePicker>
SecondColumnWidth
Gets or sets the width for picker second column.
Declaration
public double SecondColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This second column width applicable for SfTimepicker and SfDateTimePicker only.
Examples
The below example shows how to set the second column width property for the sftimepicker.
SelectedTextStyle
Gets or sets the picker selected text style in Picker.
Declaration
public PickerTextStyle SelectedTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
SelectionView
Gets or sets the value of selection view. This property can be used to customize the selection in Picker.
Declaration
public PickerSelectionView SelectionView { get; set; }
Property Value
| Type |
|---|
| PickerSelectionView |
ShowCloseButton
Gets or sets a value indicating whether the close button should be shown in the picker header. This is not supported by SfDateTimePicker.
Declaration
public bool ShowCloseButton { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
TextDisplayMode
Gets or sets the text display mode of the picker.
Declaration
public PickerTextDisplayMode TextDisplayMode { get; set; }
Property Value
| Type |
|---|
| PickerTextDisplayMode |
TextStyle
Gets or sets the picker item text style in Picker.
Declaration
public PickerTextStyle TextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
YearColumnTextStyle
Gets or sets the text style for picker year column.
Declaration
public PickerTextStyle YearColumnTextStyle { get; set; }
Property Value
| Type |
|---|
| PickerTextStyle |
Remarks
The unselected text style will not apply when setting this style.
Examples
The below example shows how to set the year column textstyle property for the sfdatepicker.
<picker:SfDatePicker >
<picker:SfDatePicker.YearColumnTextStyle>
<picker:PickerTextStyle TextColor = "Red" FontSize = "20" />
</picker:SfDatePicker.YearColumnTextStyle>
</picker:SfDatePicker>
YearColumnWidth
Gets or sets the width for picker year column.
Declaration
public double YearColumnWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
This year column width applicable for SfDatepicker and SfDateTimePicker only.
Examples
The below example shows how to set the year column width property for the sfdatepicker.
Methods
ArrangeContent(Rect)
Method used to arrange the children with in the bounds.
Declaration
protected override Size ArrangeContent(Rect bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Maui.Graphics.Rect | bounds | The size of the layout. |
Returns
| Type | Description |
|---|---|
| Microsoft.Maui.Graphics.Size | Returns layout size. |
Overrides
Initialize()
Method to wire the events.
Declaration
protected virtual void Initialize()
MeasureContent(Double, Double)
Method used to measure the children based on width and height value.
Declaration
protected override Size MeasureContent(double widthConstraint, double heightConstraint)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | widthConstraint | The maximum width request of the layout. |
| System.Double | heightConstraint | The maximum height request of the layout. |
Returns
| Type | Description |
|---|---|
| Microsoft.Maui.Graphics.Size | Returns maximum size of the layout. |
Overrides
OnCancelButtonClicked(EventArgs)
Triggers when the cancel button clicked.
Declaration
protected virtual void OnCancelButtonClicked(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | The event arguments. |
OnHeaderButtonClicked(Int32)
Triggers while the header button clicked.
Declaration
protected virtual void OnHeaderButtonClicked(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Index of the header button. |
OnOkButtonClicked(EventArgs)
Triggers when the ok button clicked.
Declaration
protected virtual void OnOkButtonClicked(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | The event arguments. |
OnPickerLoading()
Triggers while the popup opening or switched from popup to default.
Declaration
protected virtual void OnPickerLoading()
OnPopupClosed(EventArgs)
Triggers when the picker popup closed.
Declaration
protected virtual void OnPopupClosed(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | The event arguments. |
OnPopupClosing(CancelEventArgs)
Triggers when the picker popup closing.
Declaration
protected virtual void OnPopupClosing(CancelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.ComponentModel.CancelEventArgs | e | The event arguments. |
OnPopupOpened(EventArgs)
Triggers when the picker popup opened.
Declaration
protected virtual void OnPopupOpened(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | The event arguments. |
OnPropertyChanged(String)
Method triggers when the time picker property changed
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | propertyName | The property name. |
Events
CancelButtonClicked
Occurs after the cancel button clicked on SfPicker. This event is not applicable for while the footer view is not visible.
Declaration
public event EventHandler CancelButtonClicked
Event Type
| Type |
|---|
| System.EventHandler |
Closed
Occurs when the picker popup is closed.
Declaration
public event EventHandler Closed
Event Type
| Type |
|---|
| System.EventHandler |
Closing
Occurs when the picker popup is closing.
Declaration
public event EventHandler<CancelEventArgs> Closing
Event Type
| Type |
|---|
| System.EventHandler<System.ComponentModel.CancelEventArgs> |
OkButtonClicked
Occurs after the ok button clicked on SfPicker. This event is not applicable for while the footer view is not visible and the ok button is not visible.
Declaration
public event EventHandler OkButtonClicked
Event Type
| Type |
|---|
| System.EventHandler |
Opened
Occurs after the picker popup is opened.
Declaration
public event EventHandler Opened
Event Type
| Type |
|---|
| System.EventHandler |