-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathVectorChangedEventArgs.cs
More file actions
39 lines (35 loc) · 1.3 KB
/
VectorChangedEventArgs.cs
File metadata and controls
39 lines (35 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace CommunityToolkit.WinUI.Collections;
/// <summary>
/// Vector changed EventArgs
/// </summary>
internal partial class VectorChangedEventArgs : IVectorChangedEventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="VectorChangedEventArgs"/> class.
/// </summary>
/// <param name="cc">collection change type</param>
/// <param name="index">index of item changed</param>
/// <param name="item">item changed</param>
public VectorChangedEventArgs(CollectionChange cc, int index = -1, object item = null!)
{
CollectionChange = cc;
Index = (uint)index;
}
/// <summary>
/// Gets the type of change that occurred in the vector.
/// </summary>
/// <returns>
/// The type of change in the vector.
/// </returns>
public CollectionChange CollectionChange { get; }
/// <summary>
/// Gets the position where the change occurred in the vector.
/// </summary>
/// <returns>
/// The zero-based position where the change occurred in the vector, if applicable.
/// </returns>
public uint Index { get; }
}