Class CollectionView

    Definition

    Namespace:
    Tizen.NUI.Components
    Assembly:
    Tizen.NUI.Components.dll

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

    public class CollectionView : RecyclerView, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider, ICollectionChangedNotifier
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Animatable
    Container
    View
    ViewWrapper
    CustomView
    VisualView
    Control
    ScrollableBase
    RecyclerView
    CollectionView
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider
    ICollectionChangedNotifier

    Constructors

    View Source

    CollectionView()

    Base constructor.

    Declaration
    public CollectionView()
    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

    View Source

    CollectionView(IEnumerable)

    Base constructor with ItemsSource

    Declaration
    public CollectionView(IEnumerable itemsSource)
    Parameters
    Type Name Description
    IEnumerable itemsSource

    item's data source

    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

    View Source

    FooterProperty

    FooterProperty

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

    GroupFooterTemplateProperty

    GroupFooterTemplateProperty

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

    GroupHeaderTemplateProperty

    GroupHeaderTemplateProperty

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

    HeaderProperty

    HeaderProperty

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

    IsGroupedProperty

    IsGroupedProperty

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

    ItemsLayouterProperty

    ItemsLayouterProperty

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

    ScrollingDirectionProperty

    ScrollingDirectionProperty

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

    SelectedItemProperty

    Binding Property of selected item in single selection.

    Declaration
    public static readonly BindableProperty SelectedItemProperty
    Field Value
    Type Description
    BindableProperty
    View Source

    SelectedItemsProperty

    Binding Property of selected items list in multiple selection.

    Declaration
    public static readonly BindableProperty SelectedItemsProperty
    Field Value
    Type Description
    BindableProperty
    View Source

    SelectionChangedCommandParameterProperty

    SelectionChangedCommandParameterProperty

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

    SelectionChangedCommandProperty

    SelectionChangedCommandProperty

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

    SelectionModeProperty

    Binding Property of selected items list in multiple selection.

    Declaration
    public static readonly BindableProperty SelectionModeProperty
    Field Value
    Type Description
    BindableProperty

    Properties

    View Source

    Footer

    Footer item placed in bottom-most position.

    Declaration
    public RecyclerViewItem Footer { get; set; }
    Property Value
    Type Description
    RecyclerViewItem
    Remarks

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

    View Source

    GroupFooterTemplate

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

    Declaration
    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
    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
    public RecyclerViewItem Header { get; set; }
    Property Value
    Type Description
    RecyclerViewItem
    Remarks

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

    View Source

    InternalItemsLayouter

    Internal Items Layouter.

    Declaration
    protected override ItemsLayouter InternalItemsLayouter { get; set; }
    Property Value
    Type Description
    ItemsLayouter
    Overrides
    RecyclerView.InternalItemsLayouter
    View Source

    IsGrouped

    Enable groupable view.

    Declaration
    public bool IsGrouped { get; set; }
    Property Value
    Type Description
    bool
    View Source

    ItemsLayouter

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

    Declaration
    public virtual ItemsLayouter ItemsLayouter { get; set; }
    Property Value
    Type Description
    ItemsLayouter
    View Source

    ItemsSource

    Item's source data in IEnumerable.

    Declaration
    public override IEnumerable ItemsSource { get; set; }
    Property Value
    Type Description
    IEnumerable
    Overrides
    RecyclerView.ItemsSource
    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
    Type Description
    DataTemplate
    Overrides
    RecyclerView.ItemTemplate
    View Source

    ScrollingDirection

    Scrolling direction to display items layout.

    Declaration
    public ScrollableBase.Direction ScrollingDirection { get; set; }
    Property Value
    Type Description
    ScrollableBase.Direction
    View Source

    SelectedItem

    Selected item in single selection.

    Declaration
    public object SelectedItem { get; set; }
    Property Value
    Type Description
    object
    View Source

    SelectedItems

    Selected items list in multiple selection.

    Declaration
    public IList<object> SelectedItems { get; }
    Property Value
    Type Description
    IList<><object>
    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
    Type Description
    object
    View Source

    SelectionMode

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

    Declaration
    public ItemSelectionMode SelectionMode { get; set; }
    Property Value
    Type Description
    ItemSelectionMode

    Methods

    View Source

    AccessibilityScrollToChild(View)

    Scroll to specified item

    Declaration
    protected override bool AccessibilityScrollToChild(View child)
    Parameters
    Type Name Description
    View child
    Returns
    Type Description
    bool
    Overrides
    ScrollableBase.AccessibilityScrollToChild(View)
    Remarks

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

    View Source

    AdjustTargetPositionOfScrollAnimation(float)

    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
    float position

    Scroll position which is calculated by ScrollableBase

    Returns
    Type Description
    float

    Adjusted scroll destination

    Overrides
    RecyclerView.AdjustTargetPositionOfScrollAnimation(float)
    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
    View.ApplyStyle(ViewStyle)
    View Source

    ClearCache()

    Clear all remaining caches.

    Declaration
    protected override void ClearCache()
    Overrides
    RecyclerView.ClearCache()
    View Source

    Dispose(DisposeTypes)

    Dispose ItemsView and all children on it.

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

    Dispose type.

    Overrides
    RecyclerView.Dispose(DisposeTypes)
    View Source

    NotifyDataSetChanged()

    Notify Dataset is Changed.

    Declaration
    public override void NotifyDataSetChanged()
    Overrides
    RecyclerView.NotifyDataSetChanged()
    View Source

    OnInitialize()

    Initialize AT-SPI object.

    Declaration
    public override void OnInitialize()
    Overrides
    Control.OnInitialize()
    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
    RecyclerView.OnRelayout(Vector2, RelayoutContainer)
    View Source

    OnScrolling(object, ScrollEventArgs)

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

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

    Scroll source object

    ScrollEventArgs args

    Scroll event argument

    Overrides
    RecyclerView.OnScrolling(object, ScrollEventArgs)
    View Source

    OnSelectionChanged(SelectionChangedEventArgs)

    Internal selection callback.

    Declaration
    protected virtual void OnSelectionChanged(SelectionChangedEventArgs args)
    Parameters
    Type Name Description
    SelectionChangedEventArgs args
    View Source

    RealizeItem(int)

    Realize indexed item.

    Declaration
    protected override RecyclerViewItem RealizeItem(int index)
    Parameters
    Type Name Description
    int index

    Index position of realizing item

    Returns
    Type Description
    RecyclerViewItem
    Overrides
    RecyclerView.RealizeItem(int)
    View Source

    ScrollTo(int, bool, ItemScrollTo)

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

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

    Target item index of dataset.

    bool animate

    Boolean flag of animation.

    CollectionView.ItemScrollTo align

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

    View Source

    ScrollTo(float, bool)

    Scroll to specific position with or without animation.

    Declaration
    public void ScrollTo(float position, bool animate)
    Parameters
    Type Name Description
    float position

    Destination.

    bool animate

    Scroll with or without animation

    View Source

    ScrollToIndex(int)

    Scrolls to the item at the specified index.

    Declaration
    public void ScrollToIndex(int index)
    Parameters
    Type Name Description
    int index

    Index of item.

    View Source

    UnrealizeItem(RecyclerViewItem, bool)

    Unrealize indexed item.

    Declaration
    protected override void UnrealizeItem(RecyclerViewItem item, bool recycle = true)
    Parameters
    Type Name Description
    RecyclerViewItem item

    Target item for unrealizing

    bool recycle

    Allow recycle. default is true

    Overrides
    RecyclerView.UnrealizeItem(RecyclerViewItem, bool)
    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

    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
    Type Description
    EventHandler<><SelectionChangedEventArgs>

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider
    ICollectionChangedNotifier

    Extension Methods

    ViewExtensions.BackgroundColor(View)
    ViewExtensions.BorderlineColor(View)
    ViewExtensions.BoxShadow(View)
    ViewExtensions.Color(View)
    ViewExtensions.CornerRadius(View)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    ViewExtensions.BackgroundColor<T>(T, float, float, float, float)
    ViewExtensions.BackgroundColor<T>(T, uint, float)
    ViewExtensions.BackgroundColor<T>(T, UIColor)
    ViewExtensions.BackgroundImage<T>(T, string)
    ViewExtensions.Borderline<T>(T, float, UIColor, float)
    ViewExtensions.BorderlineColor<T>(T, float, float, float, float)
    ViewExtensions.BorderlineColor<T>(T, uint, float)
    ViewExtensions.BorderlineColor<T>(T, UIColor)
    ViewExtensions.BorderlineOffset<T>(T, float)
    ViewExtensions.BorderlineWidth<T>(T, float)
    ViewExtensions.BoxShadow<T>(T, float, float, float)
    ViewExtensions.BoxShadow<T>(T, float, UIColor, float, float)
    ViewExtensions.BoxShadow<T>(T, UIShadow)
    ViewExtensions.ClippingMode<T>(T, ClippingModeType)
    ViewExtensions.Color<T>(T, float, float, float, float)
    ViewExtensions.Color<T>(T, uint, float)
    ViewExtensions.Color<T>(T, UIColor)
    ViewExtensions.CornerRadius<T>(T, float, bool)
    ViewExtensions.CornerRadius<T>(T, float, float, float, float, bool)
    ViewExtensions.CornerRadius<T>(T, UICorner)
    ViewExtensions.Focusable<T>(T, bool)
    ViewExtensions.FocusableChildren<T>(T, bool)
    ViewExtensions.FocusableInTouch<T>(T, bool)
    ViewExtensions.ImageShadow<T>(T, ImageShadow)
    ViewExtensions.IsEnabled<T>(T, bool)
    ViewExtensions.Layout<T>(T, LayoutItem)
    ViewExtensions.Opacity<T>(T, float)
    ViewExtensions.Position<T>(T, float, float)
    ViewExtensions.PositionX<T>(T, float)
    ViewExtensions.PositionY<T>(T, float)
    ViewExtensions.Scale<T>(T, float, float)
    ViewExtensions.ScaleX<T>(T, float)
    ViewExtensions.ScaleY<T>(T, float)
    ViewExtensions.Sensitive<T>(T, bool)
    ViewExtensions.Size<T>(T, float, float)
    ViewExtensions.SizeHeight<T>(T, float)
    ViewExtensions.SizeWidth<T>(T, float)
    ViewExtensions.Visibility<T>(T, bool)
    ViewExtensions.VoiceInteractionName<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX