mvvmcross - Spinner SelectedItem and ItemsSource -


i have deserialized spinner object, , loaded in view model (the property bound selecteditem). mvx keeps saying not find spinner object, spinner selecteditem cannot null.

i realised deserialized spinner object not part of itemssource, since deserialized json. therefore searched corresponding item in itemssource , replaced selecteditem correct object. works.

is there cleaner way of doing this? perhaps should implement iequatable in object. please advise.

the deserialized spinner object not part of itemssource, since deserialized json. therefore searched corresponding item in itemssource , replaced selecteditem correct object.

i'm not entirely sure asking.

however, helps: there example of using equals provide object matching in spinner in https://github.com/mvvmcross/mvvmcross-tutorials/blob/master/apiexamples/apiexamples.core/viewmodels/viewmodels.cs#l105


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -