♻️ 开启虚拟化防止卡顿, 增加自适应宽度
This commit is contained in:
25
CustomComponent/VirtualizingWrapPanel/ItemRange.cs
Normal file
25
CustomComponent/VirtualizingWrapPanel/ItemRange.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GeekDesk.CustomComponent.VirtualizingWrapPanel
|
||||
{
|
||||
public struct ItemRange
|
||||
{
|
||||
public int StartIndex { get; }
|
||||
public int EndIndex { get; }
|
||||
|
||||
public ItemRange(int startIndex, int endIndex) : this()
|
||||
{
|
||||
StartIndex = startIndex;
|
||||
EndIndex = endIndex;
|
||||
}
|
||||
|
||||
public bool Contains(int itemIndex)
|
||||
{
|
||||
return itemIndex >= StartIndex && itemIndex <= EndIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user