MobileServiceCollectionView<T> Class
An asynchronous data source that can wrap the results of a Mobile Services query in a way that's easily consumed by Xaml collection controls like ListView.
Inheritance Hierarchy
System.Object
Microsoft.WindowsAzure.MobileServices.MobileServiceCollectionView<T>
Namespace: Microsoft.WindowsAzure.MobileServices
Assembly: Microsoft.WindowsAzure.MobileServices.Managed (in Microsoft.WindowsAzure.MobileServices.Managed.dll)
Syntax
'Declaration
Public NotInheritable Class MobileServiceCollectionView(Of T) _
Implements ICollectionView, IObservableVector(Of Object), _
IList(Of Object), ICollection(Of Object), IEnumerable(Of Object), _
IList, ICollection, IEnumerable, INotifyPropertyChanged, INotifyCollectionChanged, _
ISupportIncrementalLoading, ITotalCountProvider
'Usage
Dim instance As MobileServiceCollectionView(Of T)
public sealed class MobileServiceCollectionView<T> : ICollectionView,
IObservableVector<Object>, IList<Object>, ICollection<Object>,
IEnumerable<Object>, IList, ICollection, IEnumerable,
INotifyPropertyChanged, INotifyCollectionChanged, ISupportIncrementalLoading, ITotalCountProvider
generic<typename T>
public ref class MobileServiceCollectionView sealed : ICollectionView,
IObservableVector<Object^>, IList<Object^>, ICollection<Object^>,
IEnumerable<Object^>, IList, ICollection, IEnumerable,
INotifyPropertyChanged, INotifyCollectionChanged, ISupportIncrementalLoading, ITotalCountProvider
[<SealedAttribute>]
type MobileServiceCollectionView<'T> =
class
interface ICollectionView
interface IObservableVector<Object>
interface IList<Object>
interface ICollection<Object>
interface IEnumerable<Object>
interface IList
interface ICollection
interface IEnumerable
interface INotifyPropertyChanged
interface INotifyCollectionChanged
interface ISupportIncrementalLoading
interface ITotalCountProvider
end
JScript does not support generic types and methods.
Type Parameters
- T
Data source element type.
The MobileServiceCollectionView<T> type exposes the following members.
Properties
Name | Description | |
---|---|---|
CollectionGroups | Gets the collection groups associated with the collection view. | |
Count | Gets the number of elements contained in the collection. | |
CurrentItem | Gets the current item in the collection view. | |
CurrentPosition | Gets the position of the current item within the collection view. | |
HasMoreItems | Gets a value indicating whether there are more items that can be loaded incrementally. | |
IsCurrentAfterLast | Gets a value indicating whether the current item is after the end of the collection. | |
IsCurrentBeforeFirst | Gets a value indicating whether the current item is before the beginning of the collection. | |
IsReadOnly | Gets a value indicating whether the collection is read-only. | |
Item | Gets or sets the item at the specified index. |
Top
Methods
Name | Description | |
---|---|---|
Add | Adds an item to the collection. | |
Clear | Removes all items from the collection. | |
Contains | Determines whether the collection contains a given element. | |
CopyTo | Copies the elements of the collection to an array. | |
Equals | (Inherited from Object.) | |
GetEnumerator | Get an enumerator for the data source. | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
IndexOf | Determines the index of a specific item in the list. | |
Insert | Insert an item into the collection at the specified index. | |
LoadMoreItemsAsync | Load more items asynchronously. | |
MoveCurrentTo | Sets the first instance of the specified item in our currentoy loaded data as the current item in the collection view. | |
MoveCurrentToFirst | Move the current item to the first item in the collection view. | |
MoveCurrentToLast | Move the current item to the last item in the collection view. | |
MoveCurrentToNext | Move the current item to the next item in the collection view. | |
MoveCurrentToPosition | Sets the specified position as the current item in the collection view. | |
MoveCurrentToPrevious | Move the current item to the previous item in the collection view. | |
Remove | Removes the first occurence of the specified item from the list. | |
RemoveAt | Removes the item at the specified index. | |
ToString | (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
CollectionChanged | Occurs when the collection changes. | |
CurrentChanged | Occurs after the current item has been changed. | |
CurrentChanging | Occurs before the current item is changed. | |
PropertyChanged | Occurs when a property value changes. | |
VectorChanged | Occurs then the collection changes. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
ICollection<Object>.Add | Adds an item to the collection. | |
IList.Add | Adds an item the collection. | |
IList.Clear | Removes all the items from the list. | |
ICollection<Object>.Contains | Determines whether the collection contains a specific value. | |
IList.Contains | Determines whether a list contains a specified value. | |
ICollection<Object>.CopyTo | Copies the elements of the collection to an array, starting at a particular array index. | |
ICollection.CopyTo | Copy the elements of the collection to an array. | |
ICollection.Count | Gets the number of items in the collection. | |
IEnumerable<Object>.GetEnumerator | Returns an enumerator that iterates through the collection. | |
IEnumerable.GetEnumerator | Enumerate the items in the collection. | |
IList<Object>.IndexOf | Determines the index of a specific item in the collection. | |
IList.IndexOf | Determines the index of a specified item in the list. | |
IList<Object>.Insert | Inserts an item to the collection at the specified index. | |
IList.Insert | Insert an item into the collection at the specified index. | |
IList.IsFixedSize | Gets a value indicating whether the list has a fixed size. | |
IList.IsReadOnly | Gets a value indicating whether the collection is readonly. | |
ICollection.IsSynchronized | Gets a value indicating whether the collection is synchronized. | |
IList<Object>.Item | Gets or sets the item at the specified index. | |
IList.Item | Gets or sets an element at a given index. | |
ICollection<Object>.Remove | Removes the first occurrence of a specific object from the collection. | |
IList.Remove | Removes the first occurence of the specified item from the list. | |
IList.RemoveAt | Removes the item at the specified index. | |
ICollection.SyncRoot | Gets an object used to synchronize the collection. | |
ITotalCountProvider.TotalCount | Gets the total count for all the records that would have been returned ignoring any take paging/limit clause specified by client or server. |
Top
Remarks
This currently just handles asynchronously loading the data and notifying the controls, but we'd eventually like to support paging, UI virtualization, and a host of other features.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.