fixed a bug of CoverView

This commit is contained in:
NaBian committed 2019-11-02 15:42:25 +08:00
1 parent a8cb44e048
commit ceecb4231d
1 file changed
+3 -3
@@ -223,7 +223,7 @@ namespace HandyControl.Controls
{
ItemsHost.Children.Remove(_viewContent);
}
var total = Items.Count + 1;
var total = _entryDic.Count + 1;
var totalRow = total / Groups + (total % Groups > 0 ? 1 : 0);
if (total <= Groups)
{
@@ -359,9 +359,9 @@ namespace HandyControl.Controls
private void GenerateIndex()
{
var index = 0;
foreach (var item in Items)
foreach (var item in _entryDic.Values)
{
_entryDic[item].Index = index++;
item.Index = index++;
}
}