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

What are the cases that a BindableProperty's propertyChanged is called multiple times?

$
0
0

I have a custom control that has an ItemsSource property, that I set in XAML like so:

<Controls:RadioButtonsGroup Grid.Column="1" ItemsSource="{Binding lstGender}" Orientation="Horizontal" SelectedItem="{Binding SelectedGender}" HorizontalOptions="Fill"/>

backing property:

public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create(nameof(ItemsSource), typeof(IEnumerable<object>), typeof(RadioButtonsGroup), propertyChanged: OnItemsSourceChanged);

the problem is that the OnItemsSourceChanged method is called multiple times when I go back from the page and enter it again.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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