I have a ListView that includes a TimePicker:
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal">
<TimePicker Time="{Binding MyTimeSpan}" PropertyChanged="OnTimePickerPropertyChanged" >
<TimePicker.Format>hh:mm tt</TimePicker.Format>
</TimePicker>
<Label Text="{Binding Text}">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="ItemTextTapped" CommandParameter="{Binding Id}"></TapGestureRecognizer>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Then the event handler:
void OnTimePickerPropertyChanged(object sender, PropertyChangedEventArgs args)
{
if (!args.PropertyName.Equals("Time"))
return;
TimePicker picker = (TimePicker)sender;
// which Item is it?
}
How can I tell which Item is associated with the TimePicker?
FYI, Firefox does not work with your website.