Class ItemAdaptor
Base class for an Adapter Adapters provide a binding from an app-specific data set to views that are displayed within a CollectionView.
Inheritance
Implements
Inherited Members
Namespace: Tizen.UIExtensions.NUI
Assembly: Tizen.UIExtensions.NUI.dll
Syntax
public abstract class ItemAdaptor : INotifyCollectionChanged, IDisposable
Constructors
ItemAdaptor(IEnumerable)
Initializes a new instance of the ItemAdaptor class.
Declaration
protected ItemAdaptor(IEnumerable items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | items | Items soruce |
Properties
CollectionView
A CollectionView associated with current Adaptor
Declaration
public ICollectionViewController CollectionView { get; set; }
Property Value
Type | Description |
---|---|
ICollectionViewController |
Count
the number of items
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Declaration
public object this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
System.Object |
Methods
CreateNativeView()
Create a new view
Declaration
public abstract NUI.BaseComponents.View CreateNativeView()
Returns
Type | Description |
---|---|
Tizen.NUI.BaseComponents.View | Created view |
CreateNativeView(Int32)
Create a new view
Declaration
public abstract NUI.BaseComponents.View CreateNativeView(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | To used item when create a view |
Returns
Type | Description |
---|---|
Tizen.NUI.BaseComponents.View | Created view |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
GetFooterView()
Create a footer view, if footer is not existed, null will be returned
Declaration
public abstract NUI.BaseComponents.View GetFooterView()
Returns
Type | Description |
---|---|
Tizen.NUI.BaseComponents.View | A created view |
GetHeaderView()
Create a header view, if header is not existed, null will be returned
Declaration
public abstract NUI.BaseComponents.View GetHeaderView()
Returns
Type | Description |
---|---|
Tizen.NUI.BaseComponents.View | A created view |
GetItemIndex(Object)
Find item index by item
Declaration
public int GetItemIndex(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | item to find |
Returns
Type | Description |
---|---|
System.Int32 | index of item |
GetViewCategory(Int32)
A view category that represent a item, it use to distinguish kinds of view
Declaration
public virtual object GetViewCategory(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | item index |
Returns
Type | Description |
---|---|
System.Object | An identifier of category |
MeasureFooter(Double, Double)
Measure Footer size
Declaration
public abstract Size MeasureFooter(double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | widthConstraint | A width size that could be reached as maximum |
System.Double | heightConstraint | A height size that could be reached as maximum |
Returns
Type | Description |
---|---|
Size | Footer size |
MeasureHeader(Double, Double)
Measure header size
Declaration
public abstract Size MeasureHeader(double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | widthConstraint | A width size that could be reached as maximum |
System.Double | heightConstraint | A height size that could be reached as maximum |
Returns
Type | Description |
---|---|
Size | Header size |
MeasureItem(Double, Double)
Measure item size
Declaration
public abstract Size MeasureItem(double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | widthConstraint | A width size that could be reached as maximum |
System.Double | heightConstraint | A height size that could be reached as maximum |
Returns
Type | Description |
---|---|
Size | Item size |
MeasureItem(Int32, Double, Double)
Measure item size
Declaration
public abstract Size MeasureItem(int index, double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | A item index to measure |
System.Double | widthConstraint | A width size that could be reached as maximum |
System.Double | heightConstraint | A height size that could be reached as maximum |
Returns
Type | Description |
---|---|
Size | Item size |
RemoveNativeView(NUI.BaseComponents.View)
Remove view, a created view by Adaptor, should be removed by Adaptor
Declaration
public abstract void RemoveNativeView(NUI.BaseComponents.View native)
Parameters
Type | Name | Description |
---|---|---|
Tizen.NUI.BaseComponents.View | native | A view to remove |
SendItemSelected(IEnumerable<Int32>)
Handle Selected item
Declaration
public virtual void SendItemSelected(IEnumerable<int> selected)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Int32> | selected |
SetBinding(NUI.BaseComponents.View, Int32)
Set data binding between view and item
Declaration
public abstract void SetBinding(NUI.BaseComponents.View view, int index)
Parameters
Type | Name | Description |
---|---|---|
Tizen.NUI.BaseComponents.View | view | A target view |
System.Int32 | index | A target item |
SetItemsSource(IEnumerable)
Sets ItemsSource
Declaration
protected void SetItemsSource(IEnumerable items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | items | Items source |
UnBinding(NUI.BaseComponents.View)
Unset data binding on view
Declaration
public abstract void UnBinding(NUI.BaseComponents.View view)
Parameters
Type | Name | Description |
---|---|---|
Tizen.NUI.BaseComponents.View | view | A view to unbinding |
UpdateViewState(NUI.BaseComponents.View, ViewHolderState)
Update View state
Declaration
public virtual void UpdateViewState(NUI.BaseComponents.View view, ViewHolderState state)
Parameters
Type | Name | Description |
---|---|---|
Tizen.NUI.BaseComponents.View | view | A view to update |
ViewHolderState | state | State of view |
Events
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type | Description |
---|---|
System.Collections.Specialized.NotifyCollectionChangedEventHandler |