You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,7 +229,7 @@ For section template selectors, subclass `AdapterSectionDataTemplateSelector`.
229
229
230
230
All templates can contain a single `IView`, or alternatively you can use `VirtualViewCell` to wrap your view.
231
231
232
-
The `VirtualViewCell` adds some additional bindable properties that are useful for adapting your views for things like separators and selection state:
232
+
The `VirtualViewCell`'s `ResourceDictionary` will contain a set of values which are are useful for adapting your views for things like separators and selection state:
233
233
234
234
- int SectionIndex
235
235
- int ItemIndex
@@ -244,6 +244,8 @@ The `VirtualViewCell` adds some additional bindable properties that are useful f
244
244
- bool IsNotFirstItemInSection
245
245
- bool IsSelected
246
246
247
+
> NOTE: These are also available as properties on `VirtualViewCell` itself, since it implements `IPositionInfo`
248
+
247
249
You can access these properties from your templates. Here's an example of displaying an item separator using these properties, as well as changing the background color based on the selection state and a converter:
248
250
249
251
```xml
@@ -252,8 +254,7 @@ You can access these properties from your templates. Here's an example of displ
@@ -274,7 +276,7 @@ You can access these properties from your templates. Here's an example of displ
274
276
</xct:VirtualViewCell>
275
277
```
276
278
277
-
Notice the `xct:VirtualViewCell` has a `x:Name="self"`name. This allows you to reference the object and its bindable properties as the example shows inside the `BoxView`'s visibility: `IsVisible="{Binding Source={x:Reference self}, Path=IsNotFirstItemInSection}"`.
279
+
Notice the `IsVisible="{DynamicResource IsNotFirstItemInSection}"`references a resource which has been automatically populated by the `VirtualViewCell`.
278
280
279
281
## Selection
280
282
@@ -288,8 +290,22 @@ In the future there will be bindable properties and maybe a way to cancel a sele
288
290
## Refreshing
289
291
290
292
Pull to refresh is enabled for iOS/MacCatalyst and Android. WindowsAppSDK does not have the equivalent feature so there is no support for it.
291
-
292
293
You can use the `RefreshCommand` or subscribe to the `OnRefresh` event to perform your logic while the refresh indicator displays.
294
+
You must set `IsRefreshEnabled` to true to enable the gesture.
295
+
You can also set the `RefreshAccentColor` to change the color of the refresh indicator.
296
+
297
+
## Empty View
298
+
299
+
If your adapter has <= 1 section and no items, an empty view can be displayed automatically:
0 commit comments