2016-12-06 46 views

回答

1

CarouselView有一個ItemSelected事件可以訂閱:

PizzDeals.ItemSelected += (object sender, SelectedItemChangedEventArgs e) => 
{ 
    System.Diagnostics.Debug.WriteLine(e.SelectedItem); 
    var pizza = e.SelectedItem as SpecialtyPizzaDeals; 
    System.Diagnostics.Debug.WriteLine(pizza.name); 
}; 
+0

感謝您的回答壽司。有什麼方法可以在輪播視圖的下一頁中更改在視頻輪播視圖(例如,Label)中加載的視圖的任何屬性? – Divakar

+0

@Divakar通常情況下,您可以通過MVVM中的數據綁定來實現這一點,請參閱https://blog.xamarin.com/flip-through-items-with-xamarin-forms-carouselview//https:// github的.com/jamesmontemagno/Xamarin.Forms-猴子 – SushiHangover

相關問題