This commit is contained in:
vczh
2023-12-28 13:53:17 -08:00
parent 96e50fa595
commit 7ddc73032b
2 changed files with 6 additions and 6 deletions
@@ -140,13 +140,13 @@
{
self.books[last.row].SmallImage = self.iconBook16;
self.books[last.row].LargeImage = self.iconBook32;
self.books.ItemChanged(last.row, 1, 1);
datagrid.NotifyItemDataModified(last.row, 1);
}
if (current.row != -1)
{
self.books[current.row].SmallImage = self.iconOpen16;
self.books[current.row].LargeImage = self.iconOpen32;
self.books.ItemChanged(current.row, 1, 1);
datagrid.NotifyItemDataModified(current.row, 1);
}
self.datagrid.SelectCell(current, false);
});
@@ -155,8 +155,8 @@
<BindableListView ref.Name="listView" View-bind="self.views[comboView.SelectedIndex]" HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false" env.ItemType="sample::BookItem^" env.ItemName="item">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<att.ItemSource-eval>self.books</att.ItemSource-eval>
<att.LargeImageProperty>SmallImage</att.LargeImageProperty>
<att.SmallImageProperty>LargeImage</att.SmallImageProperty>
<att.LargeImageProperty>LargeImage</att.LargeImageProperty>
<att.SmallImageProperty>SmallImage</att.SmallImageProperty>
<att.Columns>
<ListViewColumn Text="Title" TextProperty="Title"/>
<ListViewColumn Text="Author" TextProperty="Author" SortingState="Ascending"/>
@@ -188,13 +188,13 @@
{
self.books[last].SmallImage = self.iconBook16;
self.books[last].LargeImage = self.iconBook32;
self.books.ItemChanged(last, 1, 1);
listView.NotifyItemDataModified(last, 1);
}
if (current != -1)
{
self.books[current].SmallImage = self.iconOpen16;
self.books[current].LargeImage = self.iconOpen32;
self.books.ItemChanged(current, 1, 1);
listView.NotifyItemDataModified(current, 1);
}
});
}