Class SfPicker
Initializes a new instance of the SfPicker class that represents a control, that allows you pick an item among a list of items.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Picker
Assembly: Syncfusion.Maui.Picker.dll
Syntax
public class SfPicker : PickerBase, 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, IParentThemeElement, IThemeElement
Constructors
SfPicker()
Initializes a new instance of the SfPicker class.
Declaration
public SfPicker()
Fields
ColumnHeaderViewProperty
Identifies the ColumnHeaderView dependency property.
Declaration
public static readonly BindableProperty ColumnHeaderViewProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for ColumnHeaderView dependency property. |
ColumnsProperty
Identifies the Columns dependency property.
Declaration
public static readonly BindableProperty ColumnsProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Columns dependency property. |
HeaderViewProperty
Identifies the HeaderView dependency property.
Declaration
public static readonly BindableProperty HeaderViewProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for HeaderView dependency property. |
ItemTemplateProperty
Identifies the ItemTemplate dependency property.
Declaration
public static readonly BindableProperty ItemTemplateProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for ItemTemplate dependency property. |
SelectionChangedCommandProperty
Identifies the SelectionChangedCommand dependency property.
Declaration
public static readonly BindableProperty SelectionChangedCommandProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for SelectionChangedCommand dependency property. |
Properties
ColumnHeaderView
Gets or sets the value of column header view. This property can be used to customize the column header in SfPicker.
Declaration
public PickerColumnHeaderView ColumnHeaderView { get; set; }
Property Value
Type |
---|
PickerColumnHeaderView |
Columns
Gets or sets the value of picker columns. This property can be used to customize the column in SfPicker.
Declaration
public ObservableCollection<PickerColumn> Columns { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<PickerColumn> |
HeaderView
Gets or sets the value of header view. This property can be used to customize the header in SfPicker.
Declaration
public PickerHeaderView HeaderView { get; set; }
Property Value
Type |
---|
PickerHeaderView |
ItemTemplate
Gets or sets the picker item template in SfPicker.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Controls.DataTemplate |
SelectionChangedCommand
Gets or sets the picker item selection changed command.
Declaration
public ICommand SelectionChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Methods
Initialize()
Method to wire the events.
Declaration
protected override void Initialize()
Overrides
OnBindingContextChanged()
Method triggers when property binding context changed.
Declaration
protected override void OnBindingContextChanged()
Overrides
OnCancelButtonClicked(EventArgs)
Method triggers when the picker cancel button clicked.
Declaration
protected override void OnCancelButtonClicked(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
OnOkButtonClicked(EventArgs)
Method triggers when the picker ok button clicked.
Declaration
protected override void OnOkButtonClicked(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
OnPopupClosed(EventArgs)
Method triggers when the picker popup closed.
Declaration
protected override void OnPopupClosed(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
OnPopupClosing(CancelEventArgs)
Method triggers when the picker popup closing.
Declaration
protected override void OnPopupClosing(CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.CancelEventArgs | e | The event arguments. |
Overrides
OnPopupOpened(EventArgs)
Method triggers when the picker popup opened.
Declaration
protected override void OnPopupOpened(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
Events
SelectionChanged
Occurs after the selected index changed on SfPicker.
Declaration
public event EventHandler<PickerSelectionChangedEventArgs> SelectionChanged
Event Type
Type |
---|
System.EventHandler<PickerSelectionChangedEventArgs> |