Class SfPicker
SfPicker represents the SfPicker class that allows you pick an item among a list of items that can be customized with custom view.
Inheritance
System.Object
SfPicker
Implements
System.IDisposable
Assembly: Syncfusion.SfPicker.XForms.dll
public class SfPicker : View, IDisposable, IParentThemeElement, IThemeElement
Constructors
Initializes a new instance of the SfPicker class.
Declaration
Fields
Backing store for the BackgroundColor property.
Declaration
public static readonly BindableProperty BackgroundColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the BorderColor property.
Declaration
public static readonly BindableProperty BorderColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the CancelButtonBackgroundColor property.
Declaration
public static readonly BindableProperty CancelButtonBackgroundColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
CancelButtonTextColorProperty
Backing store for the CancelButtonTextColor property.
Declaration
public static readonly BindableProperty CancelButtonTextColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ColumnHeaderBackgroundColor property.
Declaration
public static readonly BindableProperty ColumnHeaderBackgroundColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ColumnHeaderFontAttribute property.
Declaration
public static readonly BindableProperty ColumnHeaderFontAttributeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ColumnHeaderFontFamily property.
Declaration
public static readonly BindableProperty ColumnHeaderFontFamilyProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ColumnHeaderFontSize property.
Declaration
public static readonly BindableProperty ColumnHeaderFontSizeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ColumnHeaderHeight property.
Declaration
public static readonly BindableProperty ColumnHeaderHeightProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
ColumnHeaderTextColorProperty
Backing store for the ColumnHeaderTextColor property.
Declaration
public static readonly BindableProperty ColumnHeaderTextColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
ColumnHeaderTextProperty
Backing store for the ColumnHeaderText property.
Declaration
public static readonly BindableProperty ColumnHeaderTextProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the DisplayMemberPath property.
Declaration
public static readonly BindableProperty DisplayMemberPathProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the EnableLooping property.
Declaration
public static readonly BindableProperty EnableLoopingProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the FooterHeight property.
Declaration
public static readonly BindableProperty FooterHeightProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the FooterView property.
Declaration
public static readonly BindableProperty FooterViewProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderBackgroundColor property.
Declaration
public static readonly BindableProperty HeaderBackgroundColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderFontAttribute property.
Declaration
public static readonly BindableProperty HeaderFontAttributeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderFontFamily property.
Declaration
public static readonly BindableProperty HeaderFontFamilyProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderFontSize property.
Declaration
public static readonly BindableProperty HeaderFontSizeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderHeight property.
Declaration
public static readonly BindableProperty HeaderHeightProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderTextColor property.
Declaration
public static readonly BindableProperty HeaderTextColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderText property.
Declaration
public static readonly BindableProperty HeaderTextProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the HeaderView property.
Declaration
public static readonly BindableProperty HeaderViewProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the IsOpen property.
Declaration
public static readonly BindableProperty IsOpenProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ItemHeight property.
Declaration
public static readonly BindableProperty ItemHeightProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ItemsSource property.
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ItemTemplate property.
Declaration
public static readonly BindableProperty ItemTemplateProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the OkButtonBackgroundColor property.
Declaration
public static readonly BindableProperty OKButtonBackgroundColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
OKButtonTextColorProperty
Backing store for the OkButtonTextColor property.
Declaration
public static readonly BindableProperty OKButtonTextColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the PickerHeight property.
Declaration
public static readonly BindableProperty PickerHeightProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the PickerMode property.
Declaration
public static readonly BindableProperty PickerModeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the PickerWidth property.
Declaration
public static readonly BindableProperty PickerWidthProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the SelectedIndex property.
Declaration
public static readonly BindableProperty SelectedIndexProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the SelectedItemFontAttribute property.
Declaration
public static readonly BindableProperty SelectedItemFontAttributeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the SelectedItemFontFamily property.
Declaration
public static readonly BindableProperty SelectedItemFontFamilyProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the SelectedItemFontSize property.
Declaration
public static readonly BindableProperty SelectedItemFontSizeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the SelectedItem property.
Declaration
public static readonly BindableProperty SelectedItemProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
SelectedItemTextColorProperty
Backing store for the SelectedItemTextColor property.
Declaration
public static readonly BindableProperty SelectedItemTextColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the SelectionBackgroundColor property.
Declaration
public static readonly BindableProperty SelectionBackgroundColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ShowColumnHeader property.
Declaration
public static readonly BindableProperty ShowColumnHeaderProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ShowFooter property.
Declaration
public static readonly BindableProperty ShowFooterProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the ShowHeader property.
Declaration
public static readonly BindableProperty ShowHeaderProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the UnSelectedItemFontAttribute property.
Declaration
public static readonly BindableProperty UnSelectedItemFontAttributeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the UnSelectedItemFontFamily property.
Declaration
public static readonly BindableProperty UnSelectedItemFontFamilyProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Backing store for the UnSelectedItemFontSize property.
Declaration
public static readonly BindableProperty UnSelectedItemFontSizeProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
UnSelectedItemTextColorProperty
Backing store for the UnSelectedItemTextColor property.
Declaration
public static readonly BindableProperty UnSelectedItemTextColorProperty
Field Value
Type |
Xamarin.Forms.BindableProperty |
Properties
Gets or sets the value of the BackgroundColor. This property can be used to change the background color of the control.
Declaration
public Color BackgroundColor { get; set; }
Property Value
Gets or sets the value of the BorderColor. This property can be used to change the border color of the control.
Declaration
public Color BorderColor { get; set; }
Property Value
Gets or sets background color of the cancel button.
Declaration
public Color CancelButtonBackgroundColor { get; set; }
Property Value
CancelButtonTextColor
Gets or sets text color of the cancel button.
Declaration
public Color CancelButtonTextColor { get; set; }
Property Value
Gets or sets the value of the ColumnHeaderBackgroundColor. This property can be used to change the background color of the column header in SfPicker.
Declaration
public Color ColumnHeaderBackgroundColor { get; set; }
Property Value
Gets or sets the value of ColumnHeaderFontAttribute that indicates font attributes of column header text.
Declaration
public FontAttributes ColumnHeaderFontAttribute { get; set; }
Property Value
Type |
Description |
Xamarin.Forms.FontAttributes |
The column header font attribute.
|
Gets or sets the value of ColumnHeaderFontFamily that indicates font family of column header text.
Declaration
public string ColumnHeaderFontFamily { get; set; }
Property Value
Type |
Description |
System.String |
The header font family.
|
Gets or sets the value of ColumnHeaderFontSize. This property can be used to change the size of the column header font in SfPicker.
Declaration
public double ColumnHeaderFontSize { get; set; }
Property Value
Gets or sets the value of ColumnHeaderHeight. This property can be used to customize the height of the column header in SfPicker.
Declaration
public double ColumnHeaderHeight { get; set; }
Property Value
ColumnHeaderText
Gets or sets the value of the ColumnHeaderText. It has a collection of header text when the control represents multi-column.
Declaration
public object ColumnHeaderText { get; set; }
Property Value
ColumnHeaderTextColor
Gets or sets the value of ColumnHeaderTextColor. This property can be used to change the text color of the column header in SfPicker.
Declaration
public Color ColumnHeaderTextColor { get; set; }
Property Value
Gets or sets a path to a value on the source object to serve as the visual representation of the object.
Declaration
public object DisplayMemberPath { get; set; }
Property Value
Gets or sets a value indicating whether gets or sets a value that indicates whether each forward iteration is followed by a backward iteration or not in SfPicker.
Declaration
public bool EnableLooping { get; set; }
Property Value
Gets or sets the value of FooterHeight. This property can be used to customize the height of the footer in SfPicker.
Declaration
public double FooterHeight { get; set; }
Property Value
Gets or sets the value of FooterView. This property can be used to customize the footer in SfPicker.
Declaration
public View FooterView { get; set; }
Property Value
Gets or sets the value of the HeaderBackgroundColor. This property can be used to change the background color of header in SfPicker.
Declaration
public Color HeaderBackgroundColor { get; set; }
Property Value
Gets or sets the value of HeaderFontAttribute that indicates the font attributes of header text in SfPicker.
Declaration
public FontAttributes HeaderFontAttribute { get; set; }
Property Value
Type |
Xamarin.Forms.FontAttributes |
Gets or sets the value of HeaderFontFamily that indicates font family of header text in SfPicker.
Declaration
public string HeaderFontFamily { get; set; }
Property Value
Type |
Description |
System.String |
The header font family.
|
Gets or sets the value of the HeaderFontSize. This property can be used to change the size of the header font in SfPicker.
Declaration
public double HeaderFontSize { get; set; }
Property Value
Gets or sets the value of HeaderHeight. This property can be used to customize the height of the header in SfPicker.
Declaration
public double HeaderHeight { get; set; }
Property Value
Gets or sets the value of HeaderText. This property can be used to change the text of the header in SfPicker.
Declaration
public string HeaderText { get; set; }
Property Value
Gets or sets the value of HeaderTextColor. This property can be used to change the text color of the header in SfPicker.
Declaration
public Color HeaderTextColor { get; set; }
Property Value
Gets or sets the value of HeaderView. This property can be used to customize the of header in SfPicker.
Declaration
public View HeaderView { get; set; }
Property Value
Gets or sets a value indicating whether gets or sets the value that indicates the state of Dialog whether it is opened or closed in SfPicker.
Declaration
public bool IsOpen { get; set; }
Property Value
Gets or sets the value of the ItemHeight. This property can be used to customize the height of each picker item.
Declaration
public double ItemHeight { get; set; }
Property Value
Gets or sets a collection of items that can be populated as picker items and get rendered at run-time based on the Template provided.
Declaration
public object ItemsSource { get; set; }
Property Value
Gets or sets an instance of the Template class that defines the visual structure of a SfPicker item.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
Type |
Description |
Xamarin.Forms.DataTemplate |
The default value is null.
|
Gets or sets background color of the ok button.
Declaration
public Color OKButtonBackgroundColor { get; set; }
Property Value
OKButtonTextColor
Gets or sets text color of the ok button.
Declaration
public Color OKButtonTextColor { get; set; }
Property Value
Gets or sets the value of Parent. This property indicates a layout that holds SfPicker.
Declaration
public View Parent { get; set; }
Property Value
Type |
Description |
Xamarin.Forms.View |
The default value is null.
|
Gets or sets the value of PickerHeight. This property can be used to change the height of the Picker.
Declaration
public double PickerHeight { get; set; }
Property Value
Gets or sets the value of the PickerMode that indicates display mode of the control either as a dialog or default standalone representation.
Declaration
public PickerMode PickerMode { get; set; }
Property Value
Gets or sets the value of PickerWidth. This property can be used to change the width of the Picker.
Declaration
public double PickerWidth { get; set; }
Property Value
Gets or sets the value that indicates SelectedIndex. It has a collection of selected index when the control represents multi-column.
Declaration
public object SelectedIndex { get; set; }
Property Value
Gets or sets the value that indicates SelectedItem. It has a collection of selected items when the control represents multi-column.
Declaration
public object SelectedItem { get; set; }
Property Value
Gets or sets the value of SelectedItemFontAttribute that indicates font attributes of selected item text.
Declaration
public FontAttributes SelectedItemFontAttribute { get; set; }
Property Value
Type |
Xamarin.Forms.FontAttributes |
Gets or sets the value of SelectedItemFontFamily that indicates the font family of selected item text.
Declaration
public string SelectedItemFontFamily { get; set; }
Property Value
Type |
Description |
System.String |
The header font family.
|
Gets or sets the value of SelectedItemFontSize. This property can be used to change the size of the selected item font in SfPicker.
Declaration
public double SelectedItemFontSize { get; set; }
Property Value
SelectedItemTextColor
Gets or sets the value of SelectedItemTextColor. This property can be used to change the text color of selected item in SfPicker.
Declaration
public Color SelectedItemTextColor { get; set; }
Property Value
Gets or sets the value of SelectionBackgroundColor. This property can be used to change the background color of selected item.
Declaration
public Color SelectionBackgroundColor { get; set; }
Property Value
Gets or sets a value indicating whether gets or sets a value that indicates whether column header is shown or not in the SfPicker control.
Declaration
public bool ShowColumnHeader { get; set; }
Property Value
Gets or sets a value indicating whether gets or sets a value that indicates whether footer of the SfPicker control is shown or not.
Declaration
public bool ShowFooter { get; set; }
Property Value
Gets or sets a value indicating whether gets or sets a value that indicates whether header of the SfPicker control is shown or not.
Declaration
public bool ShowHeader { get; set; }
Property Value
Gets or sets the value of UnSelectedItemFontAttribute that indicates font attributes of the unselected items text.
Declaration
public FontAttributes UnSelectedItemFontAttribute { get; set; }
Property Value
Type |
Xamarin.Forms.FontAttributes |
Gets or sets the value of UnSelectedItemFontFamily that indicates the font family of unselected items text.
Declaration
public string UnSelectedItemFontFamily { get; set; }
Property Value
Type |
Description |
System.String |
The header font family.
|
Gets or sets the value of the UnSelectedItemFontSize. This property can be used to change the size of the unselected item font in SfPicker.
Declaration
public double UnSelectedItemFontSize { get; set; }
Property Value
UnSelectedItemTextColor
Gets or sets the value of UnSelectedItemTextColor. This property can be used to change the the text color of unselected items.
Declaration
public Color UnSelectedItemTextColor { get; set; }
Property Value
Methods
Declaration
public void add_CancelButtonClicked(SfPicker.CancelButtonEventhandler value)
Parameters
Declaration
public void add_Closed(SfPicker.ClosedEventhandler value)
Parameters
Declaration
public void add_OkButtonClicked(SfPicker.OkButtonEventhandler value)
Parameters
Declaration
public void add_OnColumnLoaded(SfPicker.ColumnLoadedEventhandler value)
Parameters
Declaration
public void add_OnPickerItemLoaded(SfPicker.PickerViewEventhandler value)
Parameters
Declaration
public void add_Opened(SfPicker.OpendedEventhandler value)
Parameters
Declaration
public void add_SelectionChanged(SfPicker.SelectionChangedChangedEventhandler value)
Parameters
Releases all resource used by the object.
Declaration
Raises the size request event.
Declaration
protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
Parameters
Type |
Name |
Description |
System.Double |
widthConstraint |
Width constraint.
|
System.Double |
heightConstraint |
Height constraint.
|
Returns
Type |
Description |
Xamarin.Forms.SizeRequest |
size request.
|
Declaration
public void remove_CancelButtonClicked(SfPicker.CancelButtonEventhandler value)
Parameters
Declaration
public void remove_Closed(SfPicker.ClosedEventhandler value)
Parameters
Declaration
public void remove_OkButtonClicked(SfPicker.OkButtonEventhandler value)
Parameters
Declaration
public void remove_OnColumnLoaded(SfPicker.ColumnLoadedEventhandler value)
Parameters
Declaration
public void remove_OnPickerItemLoaded(SfPicker.PickerViewEventhandler value)
Parameters
Declaration
public void remove_Opened(SfPicker.OpendedEventhandler value)
Parameters
Declaration
public void remove_SelectionChanged(SfPicker.SelectionChangedChangedEventhandler value)
Parameters
Events
The CancelButtonEvent occurs when click the cancel button of the SfPicker control.
Declaration
public event SfPicker.CancelButtonEventhandler CancelButtonClicked
Event Type
The ClosedEvent occurs when close the SfPicker control.
Declaration
public event SfPicker.ClosedEventhandler Closed
Event Type
The ClosingEvent occurs when close the SfPicker control
Declaration
public event EventHandler<CancelEventArgs> Closing
Event Type
The OkButtonEvent occurs when click the open button of the SfPicker control.
Declaration
public event SfPicker.OkButtonEventhandler OkButtonClicked
Event Type
The ColumnLoadedEvent occurs when column is loaded in the SfPicker control.
Declaration
public event SfPicker.ColumnLoadedEventhandler OnColumnLoaded
Event Type
The PickerViewEvent occurs when a picker item is loaded in the SfPicker control.
Declaration
public event SfPicker.PickerViewEventhandler OnPickerItemLoaded
Event Type
The OpendedEvent occurs when open the SfPicker control.
Declaration
public event SfPicker.OpendedEventhandler Opened
Event Type
The SelectionChangedChangedEvent occurs when selection of picker item is changed in the SfPicker control.
Declaration
public event SfPicker.SelectionChangedChangedEventhandler SelectionChanged
Event Type
Implements
System.IDisposable