Skip to content
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

NullReferenceException in object.GetType() when using ListView #6

Open
stenhen opened this issue Aug 7, 2018 · 0 comments
Open

NullReferenceException in object.GetType() when using ListView #6

stenhen opened this issue Aug 7, 2018 · 0 comments

Comments

@stenhen
Copy link

stenhen commented Aug 7, 2018

When using the MV-converter in an UWP ListBox control everything works fine.
However, I switched to using a ListView where an "empty placeholder rectangle" is used in the virtualization mechanism the short time the actual ListViewItem (with it's binded data) is loaded. This is to make e.g. scrolling smoother. But then I get the following exception:

Exception {System.NullReferenceException: Object reference not set to an instance of an object.
at System.Object.GetType()
at WinRTMultibinding.Foundation.Data.Binding.CheckIfBindingModeIsValid(Object source, String path, BindingMode mode)
at WinRTMultibinding.Foundation.Data.Binding.SetBinding(Object source, Boolean shouldRaiseOnSourcePropertyValueChanged)
at WinRTMultibinding.Common.Extensions.CollectionExtensions.ForEach[T](IEnumerable1 source, Action1 action)
....

Well somehow it's logical, since the actual source that's going into the converter isn't loaded yet.

Any idea how to get around or solve this?

Trying to set UpdateSourceTrigger="Explicit" in order to prevent converter to run until source is loaded didn't help.

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant