-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ItemsRepeater crashes when using custom ItemTemplateSelector that does not implement SelectTemplateCore(item) override #2170
Comments
@jtorjo I was able to make it work by using the other override of DataTemplateSelector. ItemsRepeater does not have a container, so it uses this override. We should be providing a better error in this case though or handle this scenario (we can use this bug to track that) After I made the update below and changed the data templates to show something, i was able to see the items.
|
Couldn't we just support the |
We could look at one and fallback to the other. Yes. |
Awesome, thanks! Yeah, the error should be reported better - in my case, it basically stops the app from starting. There's no way to understand anything. |
Would the following be a suitable fix:
If that would be a fix you are fine with, I would be more than happy to implement that. |
That sounds reasonable. We will have to pass null as the container and there could be app code that fails because of that, but that should be easier to debug from the app side. |
@chingucoding Sounds perfect! |
Describe the bug
I want to create a combination of treeview/listview that would behave like this: have a few roots (such as: Effects/Transitions/Text Effects). Each will expand to a few effect packs. An effect pack will show a (wrap panel) list of effects.
I wanted to implemement this as an ItemsRepeater, but no matter what I do, it crashes at startup (the app can't even start).
Steps to reproduce the bug
It could be that I'm doing something wrong, but I don't know what that would be. I've trimmed off pretty much everything, just to make it easy to debug.
To my knowledge, the above should work. Am I doing something wrong?
I've attached the whole sample project I'm using.
gridsplittertest.zip
The text was updated successfully, but these errors were encountered: