Segmented Control Selected Index Always showing Zero

HarshitaHarshita INMember ✭✭✭✭

Plugin.Segmented control always through 0 Index

Here is my XAML

<control:SegmentedControl.Children>



</control:SegmentedControl.Children>
<control:SegmentedControl.Behaviors>

</control:SegmentedControl.Behaviors>

My PageModel(Using FreshMVVM)
private int _selectedSegment;
public int SelectedSegment
{
get { return _selectedSegment; }
set
{
_selectedSegment = value;
RaisePropertyChanged("SelectedSegment");
}
}
public Command SegIndexChanged
{
get
{
return new Command(() =>
{
Application.Current.MainPage.DisplayAlert("Message", "Selected Index is : " + SelectedSegment, "Ok");
});
}
}

It always showing 0 Index. why?

Answers

Sign In or Register to comment.