ItemsRepeater.ItemTemplate does not work with RecyclingElementFactory or IElementFactory
See original GitHub issueDescribe the bug I try to use the RecyclingElementFactory or IElementFactory as an ItemsRepeater.ItemTemplate but fail - app crashes. Doc here - https://docs.microsoft.com/ru-ru/uwp/api/microsoft.ui.xaml.controls.itemsrepeater.itemtemplate?view=winui-2.4
Steps to reproduce the bug
- Create xaml like following:
<ItemsRepeater ItemsSource="{x:Bind Items}">
<ItemsRepeater.ItemTemplate>
<RecyclingElementFactory/>
</ItemsRepeater.ItemTemplate>
</ItemsRepeater>
Expected behavior All works fine.
Version Info NuGet package version: [Microsoft.WinUI 3.0.0-preview2.200713.0]
Windows app type:
UWP | Win32 |
---|---|
No | Yes |
Windows 10 version | Saw the problem? |
---|---|
May 2020 Update (19041) | Yes |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Additional context I have attached an example. App17.zip
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (11 by maintainers)
Top Results From Across the Web
ItemsRepeater.ItemTemplate Property
Set this property to a factory object used to generate a UIElement for a given data item. This can be a DataTemplate, a...
Read more >Items added to ItemsControl not using ItemTemplate
I'm trying to create a dashboard application which a user can customise by adding different controls (Tables, Graphs etc.) and move them around/ ......
Read more >ItemsRepeater
A data-driven collection control that incorporates a flexible layout system, custom views, and virtualization. ItemsRepeater is a port of the UWP ItemsRepeater ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have mistaken. All works as expected. For example:
Many thanks!
@zed220 what is it you are trying to achieve by passing an empty data template ,selector or factory ? You can pass in a rectangle or something which is not visible which could achieve the same desired result perhaps ?