Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
- API Level:
- 9
Selectable RecyclerView that presenting a collection of items with variable layouters.
public class CollectionView : RecyclerView, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider, ICollectionChangedNotifier
- Inheritance
-
- Implements
-
Constructors
Declaration
API Level: 9
View Source
CollectionView(IEnumerable)
Base constructor with ItemsSource
Declaration
public CollectionView(IEnumerable itemsSource)
Parameters
Type |
Name |
Description |
IEnumerable |
itemsSource |
item's data source
|
API Level: 9
View Source
CollectionView(IEnumerable, ItemsLayouter, DataTemplate)
Base constructor with ItemsSource, ItemsLayouter and ItemTemplate
Declaration
public CollectionView(IEnumerable itemsSource, ItemsLayouter layouter, DataTemplate template)
Parameters
Type |
Name |
Description |
IEnumerable |
itemsSource |
item's data source
|
ItemsLayouter |
layouter |
item's layout manager
|
DataTemplate |
template |
item's view template with data bindings
|
API Level: 9
View Source
CollectionView(ControlStyle)
Creates a new instance of a CollectionView with style.
Declaration
public CollectionView(ControlStyle style)
Parameters
Type |
Name |
Description |
ControlStyle |
style |
A style applied to the newly created CollectionView.
|
Fields
Declaration
public static readonly BindableProperty FooterProperty
Field Value
Declaration
public static readonly BindableProperty GroupFooterTemplateProperty
Field Value
Declaration
public static readonly BindableProperty GroupHeaderTemplateProperty
Field Value
Declaration
public static readonly BindableProperty HeaderProperty
Field Value
Declaration
public static readonly BindableProperty IsGroupedProperty
Field Value
Declaration
public static readonly BindableProperty ItemsLayouterProperty
Field Value
Declaration
public static readonly BindableProperty ScrollingDirectionProperty
Field Value
View Source
SelectedItemProperty
Binding Property of selected item in single selection.
Declaration
public static readonly BindableProperty SelectedItemProperty
Field Value
API Level: 9
View Source
SelectedItemsProperty
Binding Property of selected items list in multiple selection.
Declaration
public static readonly BindableProperty SelectedItemsProperty
Field Value
API Level: 9
View Source
SelectionChangedCommandParameterProperty
SelectionChangedCommandParameterProperty
Declaration
public static readonly BindableProperty SelectionChangedCommandParameterProperty
Field Value
View Source
SelectionChangedCommandProperty
SelectionChangedCommandProperty
Declaration
public static readonly BindableProperty SelectionChangedCommandProperty
Field Value
View Source
SelectionModeProperty
Binding Property of selected items list in multiple selection.
Declaration
public static readonly BindableProperty SelectionModeProperty
Field Value
API Level: 9
Properties
View Source
Footer item placed in bottom-most position.
Declaration
public RecyclerViewItem Footer { get; set; }
Property Value
API Level: 9
View Source
DataTemplate of group footer. Group feature is not supported yet.
Declaration
public DataTemplate GroupFooterTemplate { get; set; }
Property Value
Declaration
public DataTemplate GroupHeaderTemplate { get; set; }
Property Value
Declaration
public RecyclerViewItem Header { get; set; }
Property Value
API Level: 9
Declaration
protected override ItemsLayouter InternalItemsLayouter { get; set; }
Property Value
Overrides
Declaration
public bool IsGrouped { get; set; }
Property Value
Declaration
public virtual ItemsLayouter ItemsLayouter { get; set; }
Property Value
API Level: 9
View Source
ItemsSource
Item's source data in IEnumerable.
Declaration
public override IEnumerable ItemsSource { get; set; }
Property Value
Type |
Description |
IEnumerable |
|
Overrides
API Level: 9
View Source
ItemTemplate
DataTemplate for items.
Create visual contents and binding properties.
return object type is restricted RecyclerViewItem.
DataTemplate
Declaration
public override DataTemplate ItemTemplate { get; set; }
Property Value
Overrides
API Level: 9
View Source
Scrolling direction to display items layout.
Declaration
public ScrollableBase.Direction ScrollingDirection { get; set; }
Property Value
API Level: 9
View Source
SelectedItem
Selected item in single selection.
Declaration
public object SelectedItem { get; set; }
Property Value
API Level: 9
View Source
SelectedItems
Selected items list in multiple selection.
Declaration
public IList<object> SelectedItems { get; }
Property Value
Type |
Description |
IList<Object> |
|
API Level: 9
View Source
SelectionChangedCommand
Command of selection changed.
Declaration
public ICommand SelectionChangedCommand { get; set; }
Property Value
Type |
Description |
ICommand |
|
View Source
SelectionChangedCommandParameter
Command parameter of selection changed.
Declaration
public object SelectionChangedCommandParameter { get; set; }
Property Value
View Source
SelectionMode
Selection mode to handle items selection. See ItemSelectionMode for details.
Declaration
public ItemSelectionMode SelectionMode { get; set; }
Property Value
API Level: 9
Methods
Declaration
protected override bool AccessibilityScrollToChild(View child)
Parameters
Type |
Name |
Description |
View |
child |
|
Returns
Overrides
View Source
Adjust scrolling position by own scrolling rules.
Override this function when developer wants to change destination of flicking.(e.g. always snap to center of item)
Declaration
protected override float AdjustTargetPositionOfScrollAnimation(float position)
Parameters
Type |
Name |
Description |
Single |
position |
Scroll position which is calculated by ScrollableBase
|
Returns
Type |
Description |
Single |
Adjusted scroll destination
|
Overrides
View Source
ApplyStyle(ViewStyle)
Apply style to CollectionView
Declaration
public override void ApplyStyle(ViewStyle viewStyle)
Parameters
Type |
Name |
Description |
ViewStyle |
viewStyle |
The style to apply.
|
Overrides
Declaration
protected override void ClearCache()
Overrides
View Source
Dispose(DisposeTypes)
Dispose ItemsView and all children on it.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Overrides
API Level: 9
View Source
NotifyDataSetChanged()
Notify Dataset is Changed.
Declaration
public override void NotifyDataSetChanged()
Overrides
Declaration
public override void OnInitialize()
Overrides
View Source
OnRelayout(Vector2, RelayoutContainer)
Called after the size negotiation has been finished for this control.
The control is expected to assign this given size to itself or its children.
Should be overridden by derived classes if they need to layout views differently after certain operations like add or remove views, resize, or after changing specific properties.
As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).
Declaration
public override void OnRelayout(Vector2 size, RelayoutContainer container)
Parameters
Type |
Name |
Description |
Vector2 |
size |
The allocated size.
|
RelayoutContainer |
container |
The control should add views to this container that it is not able to allocate a size for.
|
Overrides
API Level: 9
View Source
OnScroll event callback. Requesting layout to the layouter with given scrollPosition.
Declaration
protected override void OnScrolling(object source, ScrollEventArgs args)
Parameters
Overrides
API Level: 9
View Source
OnSelectionChanged(SelectionChangedEventArgs)
Internal selection callback.
Declaration
protected virtual void OnSelectionChanged(SelectionChangedEventArgs args)
Parameters
API Level: 9
Declaration
protected override RecyclerViewItem RealizeItem(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
Index position of realizing item
|
Returns
Overrides
View Source
Scroll to specific item's aligned position with or without animation.
Declaration
public virtual void ScrollTo(int index, bool animate = false, CollectionView.ItemScrollTo align = CollectionView.ItemScrollTo.Nearest)
Parameters
API Level: 9
View Source
Scroll to specific position with or without animation.
Declaration
public void ScrollTo(float position, bool animate)
Parameters
Type |
Name |
Description |
Single |
position |
Destination.
|
Boolean |
animate |
Scroll with or without animation
|
API Level: 9
View Source
Scrolls to the item at the specified index.
Declaration
public void ScrollToIndex(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
Index of item.
|
Declaration
protected override void UnrealizeItem(RecyclerViewItem item, bool recycle = true)
Parameters
Type |
Name |
Description |
RecyclerViewItem |
item |
Target item for unrealizing
|
Boolean |
recycle |
Allow recycle. default is true
|
Overrides
View Source
UpdateSelectedItems(IList<Object>)
Update selected items list in multiple selection.
Declaration
public void UpdateSelectedItems(IList<object> newSelection)
Parameters
Type |
Name |
Description |
IList<Object> |
newSelection |
updated selection list by user
|
API Level: 9
Events
View Source
SelectionChanged
Event of Selection changed.
previous selection list and current selection will be provided.
Declaration
public event EventHandler<SelectionChangedEventArgs> SelectionChanged
Event Type
API Level: 9
Implements
Extension Methods