Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Setting BindingContext to null doesn't do anything

$
0
0

I am experimenting a bit and looking into how to reset BindingContext.
For testing purposes I have a view model with couple of properties: string Text and ImageSource Image and binding these two guys to a page that displays them (first is bound to Button.Text, the later is Bound to Image.ImageSource)

Now, if I create a Page, a ViewModel and assign it to Page.BindingContext it works as expected.
But if I afterwards set Page.BindingContext = null, nothing happens.
If I assign a "new object()" to Page.BindingContext instead then Text property (propertly) disappears but images remain. Practically I can't get rid of images in any way (I can't even set ViewModel.Image = ImageSource.Empty or something).
So, what I am missing?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>