SearchHandler.OnItemSelected(Object) Yöntem

Tanım

Geliştiriciler, kullanıcı tarafından seçilen bir arama sonucuna yanıt vermek için bu yöntemi geçersiz kılabilir.

protected virtual void OnItemSelected (object item);
abstract member OnItemSelected : obj -> unit
override this.OnItemSelected : obj -> unit

Parametreler

item
System.Object

Açıklamalar

Genellikle geliştiriciler tarafından belirtilen bir hedefe gitmek için bu yöntemi geçersiz kılar:

protected override async void OnItemSelected(object item)
{
    base.OnItemSelected(item);
    // Note: strings will be URL encoded for navigation (e.g. "Blue Monkey" becomes "Blue%20Monkey"). Therefore, decode at the receiver.
    await (App.Current.MainPage as Xamarin.Forms.Shell).GoToAsync($"app://xamarin.com/xaminals/animals/monkeys/monkeydetails?name={((Animal)item).Name}");
}

Şunlara uygulanır