ItemsSourceView Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a standardized view of the supported interactions between a given ItemsSource object and an ItemsRepeater control.
/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class ItemsSourceView : INotifyCollectionChanged
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class ItemsSourceView : INotifyCollectionChanged
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public class ItemsSourceView : INotifyCollectionChanged
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public class ItemsSourceView : INotifyCollectionChanged
Public Class ItemsSourceView
Implements INotifyCollectionChanged
- Inheritance
- Attributes
-
Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute Marshaling
Behavior ThreadingAttribute Attribute VersionAttribute ContractVersion Attribute
- Implements
Tip
For more info, design guidance, and code examples, see ItemsRepeater.
The WinUI 3 Gallery app includes interactive examples of most WinUI 3 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub.
Components written to work with ItemsRepeater should consume the ItemsSource via ItemsSourceView since this provides a normalized view of the ItemsSource. That way, each component does not need to know if the source is an IEnumerable, an IVector, or something else.
Items |
Initializes a new instance of the ItemsSourceView class for the specified data source. |
Count |
Gets the number of items in the collection. |
Has |
Gets a value that indicates whether the items source can provide a unique key for each item. |
Get |
Retrieves the item at the specified index. |
Index |
Retrieves the index of the item that has the specified unique identifier (key). |
Index |
Retrieves the index of the specified item. |
Key |
Retrieves the unique identifier (key) for the item at the specified index. |
Collection |
Occurs when the collection has changed to indicate the reason for the change and which items changed. |
Produk | Versi |
---|---|
Windows App SDK | 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 |