Class CollectionView

Definition

Namespace:
Tizen.NUI.Components
Assembly:
Tizen.NUI.Components.dll
API Level:
9

Selectable RecyclerView that presenting a collection of items with variable layouters.

C#
Copy
public class CollectionView : RecyclerView, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider, ICollectionChangedNotifier
Inheritance
Implements

Constructors

View Source

CollectionView()

Base constructor.

Declaration
C#
Copy
public CollectionView()
API Level: 9
View Source

CollectionView(IEnumerable)

Base constructor with ItemsSource

Declaration
C#
Copy
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
C#
Copy
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
C#
Copy
public CollectionView(ControlStyle style)
Parameters
Type Name Description
ControlStyle style

A style applied to the newly created CollectionView.

Fields

View Source

FooterProperty

FooterProperty

Declaration
C#
Copy
public static readonly BindableProperty FooterProperty
Field Value
Type Description
BindableProperty
View Source

GroupFooterTemplateProperty

GroupFooterTemplateProperty

Declaration
C#
Copy
public static readonly BindableProperty GroupFooterTemplateProperty
Field Value
Type Description
BindableProperty
View Source

GroupHeaderTemplateProperty

GroupHeaderTemplateProperty

Declaration
C#
Copy
public static readonly BindableProperty GroupHeaderTemplateProperty
Field Value
Type Description
BindableProperty
View Source

HeaderProperty

HeaderProperty

Declaration
C#
Copy
public static readonly BindableProperty HeaderProperty
Field Value
Type Description
BindableProperty
View Source

IsGroupedProperty

IsGroupedProperty

Declaration
C#
Copy
public static readonly BindableProperty IsGroupedProperty
Field Value
Type Description
BindableProperty
View Source

ItemsLayouterProperty

ItemsLayouterProperty

Declaration
C#
Copy
public static readonly BindableProperty ItemsLayouterProperty
Field Value
Type Description
BindableProperty
View Source

ScrollingDirectionProperty

ScrollingDirectionProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollingDirectionProperty
Field Value
Type Description
BindableProperty
View Source

SelectedItemProperty

Binding Property of selected item in single selection.

Declaration
C#
Copy
public static readonly BindableProperty SelectedItemProperty
Field Value
Type Description
BindableProperty
API Level: 9
View Source

SelectedItemsProperty

Binding Property of selected items list in multiple selection.

Declaration
C#
Copy
public static readonly BindableProperty SelectedItemsProperty
Field Value
Type Description
BindableProperty
API Level: 9
View Source

SelectionChangedCommandParameterProperty

SelectionChangedCommandParameterProperty

Declaration
C#
Copy
public static readonly BindableProperty SelectionChangedCommandParameterProperty
Field Value
Type Description
BindableProperty
View Source

SelectionChangedCommandProperty

SelectionChangedCommandProperty

Declaration
C#
Copy
public static readonly BindableProperty SelectionChangedCommandProperty
Field Value
Type Description
BindableProperty
View Source

SelectionModeProperty

Binding Property of selected items list in multiple selection.

Declaration
C#
Copy
public static readonly BindableProperty SelectionModeProperty
Field Value
Type Description
BindableProperty
API Level: 9

Properties

View Source

Footer item placed in bottom-most position.

Declaration
C#
Copy
public RecyclerViewItem Footer { get; set; }
Property Value
Type Description
RecyclerViewItem

Please note that, internal index will be increased by footer.

API Level: 9
View Source

GroupFooterTemplate

DataTemplate of group footer. Group feature is not supported yet.

Declaration
C#
Copy
public DataTemplate GroupFooterTemplate { get; set; }
Property Value
Type Description
DataTemplate
Remarks

Please note that, internal index will be increased by group footer.

View Source

GroupHeaderTemplate

DataTemplate of group header.

Declaration
C#
Copy
public DataTemplate GroupHeaderTemplate { get; set; }
Property Value
Type Description
DataTemplate
Remarks

Please note that, internal index will be increased by group header. GroupHeaderTemplate is essential for groupable view.

View Source

Header

Header item placed in top-most position.

Declaration
C#
Copy
public RecyclerViewItem Header { get; set; }
Property Value
Type Description
RecyclerViewItem
Remarks

Please note that, internal index will be increased by header.

API Level: 9
View Source

InternalItemsLayouter

Internal Items Layouter.

Declaration
C#
Copy
protected override ItemsLayouter InternalItemsLayouter { get; set; }
Property Value
Type Description
ItemsLayouter
Overrides
View Source

IsGrouped

Enable groupable view.

Declaration
C#
Copy
public bool IsGrouped { get; set; }
Property Value
Type Description
Boolean
View Source

ItemsLayouter

Items Layouter. Layouting items on the scroll ContentContainer. ItemsLayouter LinearLayouter GridLayouter

Declaration
C#
Copy
public virtual ItemsLayouter ItemsLayouter { get; set; }
Property Value
Type Description
ItemsLayouter
API Level: 9
View Source

ItemsSource

Item's source data in IEnumerable.

Declaration
C#
Copy
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
C#
Copy
public override DataTemplate ItemTemplate { get; set; }
Property Value
Type Description
DataTemplate
Overrides
API Level: 9
View Source

ScrollingDirection

Scrolling direction to display items layout.

Declaration
C#
Copy
public ScrollableBase.Direction ScrollingDirection { get; set; }
Property Value
Type Description
ScrollableBase.Direction
API Level: 9
View Source

SelectedItem

Selected item in single selection.

Declaration
C#
Copy
public object SelectedItem { get; set; }
Property Value
Type Description
Object
API Level: 9
View Source

SelectedItems

Selected items list in multiple selection.

Declaration
C#
Copy
public IList<object> SelectedItems { get; }
Property Value
Type Description
IList<Object>
API Level: 9
View Source

SelectionChangedCommand

Command of selection changed.

Declaration
C#
Copy
public ICommand SelectionChangedCommand { get; set; }
Property Value
Type Description
ICommand
View Source

SelectionChangedCommandParameter

Command parameter of selection changed.

Declaration
C#
Copy
public object SelectionChangedCommandParameter { get; set; }
Property Value
Type Description
Object
View Source

SelectionMode

Selection mode to handle items selection. See ItemSelectionMode for details.

Declaration
C#
Copy
public ItemSelectionMode SelectionMode { get; set; }
Property Value
Type Description
ItemSelectionMode
API Level: 9

Methods

View Source

AccessibilityScrollToChild(View)

Scroll to specified item

Declaration
C#
Copy
protected override bool AccessibilityScrollToChild(View child)
Parameters
Type Name Description
View child
Returns
Type Description
Boolean
Overrides
Remarks

Make sure that the item that is about to receive the accessibility highlight is visible.

View Source

AdjustTargetPositionOfScrollAnimation(Single)

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
C#
Copy
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
C#
Copy
public override void ApplyStyle(ViewStyle viewStyle)
Parameters
Type Name Description
ViewStyle viewStyle

The style to apply.

Overrides
View Source

ClearCache()

Clear all remaining caches.

Declaration
C#
Copy
protected override void ClearCache()
Overrides
View Source

Dispose(DisposeTypes)

Dispose ItemsView and all children on it.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type

Dispose type.

Overrides
API Level: 9
View Source

NotifyDataSetChanged()

Notify Dataset is Changed.

Declaration
C#
Copy
public override void NotifyDataSetChanged()
Overrides
View Source

OnInitialize()

Initialize AT-SPI object.

Declaration
C#
Copy
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
C#
Copy
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

OnScrolling(Object, ScrollEventArgs)

OnScroll event callback. Requesting layout to the layouter with given scrollPosition.

Declaration
C#
Copy
protected override void OnScrolling(object source, ScrollEventArgs args)
Parameters
Type Name Description
Object source

Scroll source object

ScrollEventArgs args

Scroll event argument

Overrides
API Level: 9
View Source

OnSelectionChanged(SelectionChangedEventArgs)

Internal selection callback.

Declaration
C#
Copy
protected virtual void OnSelectionChanged(SelectionChangedEventArgs args)
Parameters
Type Name Description
SelectionChangedEventArgs args
API Level: 9
View Source

RealizeItem(Int32)

Realize indexed item.

Declaration
C#
Copy
protected override RecyclerViewItem RealizeItem(int index)
Parameters
Type Name Description
Int32 index

Index position of realizing item

Returns
Type Description
RecyclerViewItem
Overrides
View Source

ScrollTo(Int32, Boolean, CollectionView.ItemScrollTo)

Scroll to specific item's aligned position with or without animation.

Declaration
C#
Copy
public virtual void ScrollTo(int index, bool animate = false, CollectionView.ItemScrollTo align = CollectionView.ItemScrollTo.Nearest)
Parameters
Type Name Description
Int32 index

Target item index of dataset.

Boolean animate

Boolean flag of animation.

CollectionView.ItemScrollTo align

Align state of item. See details in CollectionView.ItemScrollTo.

API Level: 9
View Source

ScrollTo(Single, Boolean)

Scroll to specific position with or without animation.

Declaration
C#
Copy
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

ScrollToIndex(Int32)

Scrolls to the item at the specified index.

Declaration
C#
Copy
public void ScrollToIndex(int index)
Parameters
Type Name Description
Int32 index

Index of item.

View Source

UnrealizeItem(RecyclerViewItem, Boolean)

Unrealize indexed item.

Declaration
C#
Copy
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
C#
Copy
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
C#
Copy
public event EventHandler<SelectionChangedEventArgs> SelectionChanged
Event Type
Type Description
EventHandler<SelectionChangedEventArgs>
API Level: 9

Implements

Extension Methods