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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
Properties
AcceptCommand
Gets or sets the picker ok button clicked command.
Declaration
public ICommand AcceptCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
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 |
DeclineCommand
Gets or sets the picker cancel button clicked command.
Declaration
public ICommand DeclineCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
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 |
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 |
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 |
Mode
Gets or sets the mode of the picker.
Declaration
public PickerMode Mode { get; set; }
Property Value
Type |
---|
PickerMode |
RelativePosition
Gets or sets the relative position of the picker popup.
Declaration
public PickerRelativePosition RelativePosition { get; set; }
Property Value
Type |
---|
PickerRelativePosition |
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 |
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 |
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 |