Class SfPicker
Represents a control that allows user to pick an item among a list of Items that can be customize or template with custom view. This control can also open as dialog.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Controls.Input
Assembly: Syncfusion.SfInput.UWP.dll
Syntax
public class SfPicker : ItemsControl, IDisposable
Constructors
SfPicker()
Initializes a new instance of the SfPicker class.
Declaration
public SfPicker()
Fields
ColumnHeaderBackgroundProperty
Using a DependencyProperty as the backing store for ColumnHeaderBackground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderBackgroundProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderFontFamilyProperty
Using a DependencyProperty as the backing store for ColumnHeaderFontFamily. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderFontFamilyProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderFontSizeProperty
Using a DependencyProperty as the backing store for ColumnHeaderFontSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderFontSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderFontStyleProperty
Using a DependencyProperty as the backing store for ColumnHeaderFontStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderFontStyleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderFontWeightProperty
Using a DependencyProperty as the backing store for SelectedItemFontStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderFontWeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderForegroundProperty
Using a DependencyProperty as the backing store for ColumnHeaderForeground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderForegroundProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderHeightProperty
Using a DependencyProperty as the backing store for ColumnHeaderHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderHeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderTemplateProperty
Using a DependencyProperty as the backing store for ColumnHeaderTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ColumnHeaderTextProperty
Using a DependencyProperty as the backing store for ColumnHeaderText. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ColumnHeaderTextProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
EnableLoopingProperty
Using a DependencyProperty as the backing store for Enable Auto Reverse Scroll. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty EnableLoopingProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
FooterBackgroundProperty
Using a DependencyProperty as the backing store for FooterBackground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty FooterBackgroundProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
FooterHeightProperty
Using a DependencyProperty as the backing store for FooterHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty FooterHeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
FooterProperty
Using a DependencyProperty as the backing store for Footer. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty FooterProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
FooterTemplateProperty
Using a DependencyProperty as the backing store for FooterTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty FooterTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderBackgroundProperty
Using a DependencyProperty as the backing store for HeaderBackground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderBackgroundProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderFontFamilyProperty
Using a DependencyProperty as the backing store for HeaderFontFamily. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderFontFamilyProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderFontSizeProperty
Using a DependencyProperty as the backing store for HeaderFontSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderFontSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderFontStyleProperty
Using a DependencyProperty as the backing store for HeaderFontStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderFontStyleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderFontWeightProperty
Using a DependencyProperty as the backing store for SelectedItemFontStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderFontWeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderForegroundProperty
Using a DependencyProperty as the backing store for HeaderForeground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderForegroundProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderHeightProperty
Using a DependencyProperty as the backing store for HeaderHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderHeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderProperty
Using a DependencyProperty as the backing store for Header. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderTemplateProperty
Using a DependencyProperty as the backing store for HeaderTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
IsOpenProperty
Using a DependencyProperty as the backing store for IsOpen. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty IsOpenProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ItemHeightProperty
Using a DependencyProperty as the backing store for ItemHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ItemHeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ItemsSourceProperty
Using a DependencyProperty as the backing store for ItemsSource. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
PickerModeProperty
Using a DependencyProperty as the backing store for PickerMode. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty PickerModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
PopupHeightProperty
Using a DependencyProperty as the backing store for PopupHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty PopupHeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
PopupWidthProperty
Using a DependencyProperty as the backing store for PopupWidth. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty PopupWidthProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedIndexProperty
Using a DependencyProperty as the backing store for SelectedIndex. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedIndexProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedItemFontFamilyProperty
Using a DependencyProperty as the backing store for SelectedItemFontFamily. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedItemFontFamilyProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedItemFontSizeProperty
Using a DependencyProperty as the backing store for SelectedItemFontSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedItemFontSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedItemFontStyleProperty
Using a DependencyProperty as the backing store for SelectedItemFontStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedItemFontStyleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedItemFontWeightProperty
Using a DependencyProperty as the backing store for SelectedItemFontStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedItemFontWeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedItemForegroundProperty
Using a DependencyProperty as the backing store for SelectedItemForeground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedItemForegroundProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedItemProperty
Using a DependencyProperty as the backing store for SelectedItem. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectionBackgroundProperty
Using a DependencyProperty as the backing store for SelectedBackground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectionBackgroundProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowColumnHeaderProperty
Using a DependencyProperty as the backing store for ShowColumnHeader. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowColumnHeaderProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowFooterProperty
Using a DependencyProperty as the backing store for ShowFooter. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowFooterProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowHeaderProperty
Using a DependencyProperty as the backing store for ShowHeader. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowHeaderProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
CancelButton
Gets or sets the value of cancel button.
Declaration
public Button CancelButton { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Controls.Button |
ColumnHeaderBackground
Gets or sets the value that indicating that background of column header
Declaration
public Brush ColumnHeaderBackground { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
ColumnHeaderFontFamily
Gets or sets the value that indicating font family of column header text
Declaration
public FontFamily ColumnHeaderFontFamily { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.FontFamily |
ColumnHeaderFontSize
Gets or sets the value that indicating font size of column header text
Declaration
public double ColumnHeaderFontSize { get; set; }
Property Value
Type |
---|
System.Double |
ColumnHeaderFontStyle
Gets or sets the value that indicating font style of column header text
Declaration
public FontStyle ColumnHeaderFontStyle { get; set; }
Property Value
Type |
---|
Windows.UI.Text.FontStyle |
ColumnHeaderFontWeight
Gets or sets the value of Column Header Font Weight
Declaration
public FontWeight ColumnHeaderFontWeight { get; set; }
Property Value
Type |
---|
Windows.UI.Text.FontWeight |
ColumnHeaderForeground
Gets or sets the value that indicating that foreground of column header text
Declaration
public Brush ColumnHeaderForeground { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
ColumnHeaderHeight
Gets or sets the value that determines the height of the column header
Declaration
public double ColumnHeaderHeight { get; set; }
Property Value
Type |
---|
System.Double |
ColumnHeaderTemplate
Gets or sets the value of data template that will hold on ColumnHeader
Declaration
public DataTemplate ColumnHeaderTemplate { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.DataTemplate |
ColumnHeaderText
Gets or sets the value indicating columns header. It has collection of header text when the control represents multi column
Declaration
public object ColumnHeaderText { get; set; }
Property Value
Type |
---|
System.Object |
EnableLooping
Gets or sets a value indicating whether true or false.
Declaration
public bool EnableLooping { get; set; }
Property Value
Type |
---|
System.Boolean |
Footer
Gets or sets the value that indicating footer of the control
Declaration
public object Footer { get; set; }
Property Value
Type |
---|
System.Object |
FooterBackground
Gets or sets the value that indicating that background of footer
Declaration
public Brush FooterBackground { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
FooterHeight
Gets or sets the value that determines the height of the footer
Declaration
public double FooterHeight { get; set; }
Property Value
Type |
---|
System.Double |
FooterTemplate
Gets or sets the value of data template that will hold on Footer
Declaration
public DataTemplate FooterTemplate { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.DataTemplate |
Header
Gets or sets the value that indicating header of the control
Declaration
public object Header { get; set; }
Property Value
Type |
---|
System.Object |
HeaderBackground
Gets or sets the value that indicating that background of header
Declaration
public Brush HeaderBackground { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
HeaderFontFamily
Gets or sets the value that indicating font family of header text
Declaration
public FontFamily HeaderFontFamily { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.FontFamily |
HeaderFontSize
Gets or sets the value that indicating font size of header text
Declaration
public double HeaderFontSize { get; set; }
Property Value
Type |
---|
System.Double |
HeaderFontStyle
Gets or sets the value that indicating font font style of header text
Declaration
public FontStyle HeaderFontStyle { get; set; }
Property Value
Type |
---|
Windows.UI.Text.FontStyle |
HeaderFontWeight
Gets or sets the value of Header Font Weight
Declaration
public FontWeight HeaderFontWeight { get; set; }
Property Value
Type |
---|
Windows.UI.Text.FontWeight |
HeaderForeground
Gets or sets the value that indicating that foreground of header text
Declaration
public Brush HeaderForeground { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
HeaderHeight
Gets or sets the value that determines the height of the header
Declaration
public double HeaderHeight { get; set; }
Property Value
Type |
---|
System.Double |
HeaderTemplate
Gets or sets the value of data template that will hold on Header
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.DataTemplate |
IsOpen
Gets or sets a value indicating whether true or false.
Declaration
public bool IsOpen { get; set; }
Property Value
Type |
---|
System.Boolean |
ItemHeight
Gets or sets the value that determines the height of the items
Declaration
public double ItemHeight { get; set; }
Property Value
Type |
---|
System.Double |
ItemsSource
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
Type |
---|
System.Object |
OkButton
Gets or sets the value of ok button
Declaration
public Button OkButton { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Controls.Button |
PickerMode
Gets or sets the value that indicating display mode of the control either as a dialog or default standalone representation
Declaration
public PickerMode PickerMode { get; set; }
Property Value
Type |
---|
PickerMode |
SelectedIndex
Gets or sets the value indicating selected index. It has collection selected index when the control represents multi column.
Declaration
public object SelectedIndex { get; set; }
Property Value
Type |
---|
System.Object |
SelectedItem
Gets or sets the value indicating selected item. It has collection selected item when the control represents multi column.
Declaration
public object SelectedItem { get; set; }
Property Value
Type |
---|
System.Object |
SelectedItemFontFamily
Gets or sets the value that indicating that font family of selected item text
Declaration
public FontFamily SelectedItemFontFamily { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.FontFamily |
SelectedItemFontSize
Gets or sets the value that indicating font size of selected item text
Declaration
public double SelectedItemFontSize { get; set; }
Property Value
Type |
---|
System.Double |
SelectedItemFontStyle
Gets or sets the value that indicating font style of selected item text
Declaration
public FontStyle SelectedItemFontStyle { get; set; }
Property Value
Type |
---|
Windows.UI.Text.FontStyle |
SelectedItemFontWeight
Gets or sets the value of selected font item value
Declaration
public FontWeight SelectedItemFontWeight { get; set; }
Property Value
Type |
---|
Windows.UI.Text.FontWeight |
SelectedItemForeground
Gets or sets the value that indicating that foreground of selected item text
Declaration
public Brush SelectedItemForeground { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
SelectionBackground
Gets or sets the value that indicating that background of selection box
Declaration
public Brush SelectionBackground { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
ShowColumnHeader
Gets or sets a value indicating whether true or false.
Declaration
public bool ShowColumnHeader { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowFooter
Gets or sets a value indicating whether true or false.
Declaration
public bool ShowFooter { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowHeader
Gets or sets a value indicating whether true or false.
Declaration
public bool ShowHeader { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
add_ColumnLoaded(SfPicker.ColumnLoadedEventHandler)
Declaration
public void add_ColumnLoaded(SfPicker.ColumnLoadedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfPicker.ColumnLoadedEventHandler | value |
add_Opening(SfPicker.OpeningEventHandler)
Declaration
public void add_Opening(SfPicker.OpeningEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfPicker.OpeningEventHandler | value |
add_SfPickerItemLoaded(SfPicker.PickerItemLoadedEventHandler)
Declaration
public void add_SfPickerItemLoaded(SfPicker.PickerItemLoadedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfPicker.PickerItemLoadedEventHandler | value |
ClearContainerForItemOverride(DependencyObject, Object)
Clear Container For Item Override method.
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | element | Dependency Object |
System.Object | item | object value |
Close()
Closes the dialog when the control in Dialog mode
Declaration
public void Close()
Dispose()
Releases the unmanaged resources used by the control and optionally releases the managed resources
Declaration
public void Dispose()
Dispose(Boolean)
Dispose method for suppress
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Boolean type |
GetContainerForItemOverride()
Get Container For Item Override
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
Type | Description |
---|---|
Windows.UI.Xaml.DependencyObject | picker group |
IsItemItsOwnContainerOverride(Object)
Is Item It sOwn Container Override method.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | object type |
Returns
Type | Description |
---|---|
System.Boolean | item value |
OnApplyTemplate()
On apply template method
Declaration
protected override void OnApplyTemplate()
Open()
Opens the dialog when the control in Dialog mode
Declaration
public void Open()
PrepareContainerForItemOverride(DependencyObject, Object)
Prepare container for item override method.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | element | Dependency object type |
System.Object | item | object type |
remove_ColumnLoaded(SfPicker.ColumnLoadedEventHandler)
Declaration
public void remove_ColumnLoaded(SfPicker.ColumnLoadedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfPicker.ColumnLoadedEventHandler | value |
remove_Opening(SfPicker.OpeningEventHandler)
Declaration
public void remove_Opening(SfPicker.OpeningEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfPicker.OpeningEventHandler | value |
remove_SfPickerItemLoaded(SfPicker.PickerItemLoadedEventHandler)
Declaration
public void remove_SfPickerItemLoaded(SfPicker.PickerItemLoadedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfPicker.PickerItemLoadedEventHandler | value |
Events
CancelButtonClicked
Occurs when the default Cancel button clicked
Declaration
public event SelectionChangedEventHandler CancelButtonClicked
Event Type
Type |
---|
Windows.UI.Xaml.Controls.SelectionChangedEventHandler |
Closed
Occurs when the dialog getting closed.
Declaration
public event RoutedEventHandler Closed
Event Type
Type |
---|
Windows.UI.Xaml.RoutedEventHandler |
ColumnLoaded
Occurs when each column getting loaded. Users can customize the column using its event parameters
Declaration
public event SfPicker.ColumnLoadedEventHandler ColumnLoaded
Event Type
Type |
---|
SfPicker.ColumnLoadedEventHandler |
OkButtonClicked
Occurs when the default OK button clicked
Declaration
public event SelectionChangedEventHandler OkButtonClicked
Event Type
Type |
---|
Windows.UI.Xaml.Controls.SelectionChangedEventHandler |
Opened
Occurs when the dialog getting opened.
Declaration
public event RoutedEventHandler Opened
Event Type
Type |
---|
Windows.UI.Xaml.RoutedEventHandler |
Opening
Occurs when the dialog getting opening.
Declaration
public event SfPicker.OpeningEventHandler Opening
Event Type
Type |
---|
SfPicker.OpeningEventHandler |
SelectionChanged
Occurs when the user selects an item from unselected items.
Declaration
public event SelectionChangedEventHandler SelectionChanged
Event Type
Type |
---|
Windows.UI.Xaml.Controls.SelectionChangedEventHandler |
SfPickerItemLoaded
Occurs when each item getting loaded. Users can customize the items or its view using its event parameters
Declaration
public event SfPicker.PickerItemLoadedEventHandler SfPickerItemLoaded
Event Type
Type |
---|
SfPicker.PickerItemLoadedEventHandler |