csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
42 lines
1.4 KiB
namespace Avalonia.Controls.Generators
|
|
{
|
|
/// <summary>
|
|
/// Holds information about an item container generated by an
|
|
/// <see cref="IItemContainerGenerator"/>.
|
|
/// </summary>
|
|
public class ItemContainerInfo
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="ItemContainerInfo"/> class.
|
|
/// </summary>
|
|
/// <param name="container">The container control.</param>
|
|
/// <param name="item">The item that the container represents.</param>
|
|
/// <param name="index">
|
|
/// The index of the item in the <see cref="ItemsControl.Items"/> collection.
|
|
/// </param>
|
|
public ItemContainerInfo(IControl container, object item, int index)
|
|
{
|
|
ContainerControl = container;
|
|
Item = item;
|
|
Index = index;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the container control.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This will be null if <see cref="Item"/> is null.
|
|
/// </remarks>
|
|
public IControl ContainerControl { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the item that the container represents.
|
|
/// </summary>
|
|
public object Item { get; internal set; }
|
|
|
|
/// <summary>
|
|
/// Gets the index of the item in the <see cref="ItemsControl.Items"/> collection.
|
|
/// </summary>
|
|
public int Index { get; set; }
|
|
}
|
|
}
|
|
|