本文整理汇总了C#中ItemTappedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ItemTappedEventArgs类的具体用法?C# ItemTappedEventArgs怎么用?C# ItemTappedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemTappedEventArgs类属于命名空间,在下文中一共展示了ItemTappedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: listViewMenuSpeed_OnItemSelected
public void listViewMenuSpeed_OnItemSelected (object sender, ItemTappedEventArgs args_tapped)
{
object item = args_tapped.Item;
KeyValuePair<string, string> kvp = (KeyValuePair<string, string>)item;
string type_as_string = kvp.Value;
Type type = Type.GetType (type_as_string);
try
{
Page page =
(Page)Activator.CreateInstance (type)
// HolisticWare.Mobile.UI.XamarinForms.Activator.CreateElement<Page>(type_as_string)
;
this.Navigation.PushAsync (page);
}
catch (Exception exc)
{
Xamarin.Insights.Report
(
exc,
Xamarin.Insights.Severity.Critical
);
throw;
}
return;
}
示例2: ItemTapped
protected async void ItemTapped(object sender, ItemTappedEventArgs args) {
var item = args.Item as ListItemPage;
if (item == null) return;
Page page = (Page)Activator.CreateInstance(item.PageType);
await Navigation.PushAsync(page);
itemList.SelectedItem = null;
}
示例3: OnTap
async void OnTap(object sender, ItemTappedEventArgs e)
{
CurrentCategory = e.Item.ToString ();
await Navigation.PopAsync();
}
示例4: productListView_ItemTapped
async void productListView_ItemTapped(object sender, ItemTappedEventArgs e)
{
// Just Add to the ViewModel
((ProductsPageViewModel)this.BindingContext).IsBusy = true;
((ProductsPageViewModel)this.BindingContext).AddProductSelection(((ProductsPageViewModel.ProductsViewModel)e.Item));
((ProductsPageViewModel)this.BindingContext).IsBusy = false;
}
示例5: CompletedTaskListView_OnItemTapped
private void CompletedTaskListView_OnItemTapped(object sender, ItemTappedEventArgs e)
{
var model = BindingContext as CompletedTaskViewModel;
if (model == null || e.Item == null) return;
model.CloneUserTaskCommand.Execute(e.Item);
}
示例6: ItemTapped
void ItemTapped (object sender, ItemTappedEventArgs e)
{
// send message to navigate to detail page
MessagingService.Current.SendMessage<CustomerDetailViewModel>(MessageKeys.NavigateToDetailPage, new CustomerDetailViewModel((Customer)e.Item));
((ListView)sender).SelectedItem = null;
}
示例7: OnItemTapped
async void OnItemTapped(object sender, ItemTappedEventArgs e)
{
var item = e.Item as Question;
var questions = QuestionList.Where(x => x.StudyPlan.Equals(StudyPlan)).ToList();
var dataCtx = new QuestionSessionManager(questions, SessionType.PractiseMode);
await Navigation.PushAsync(new QuestionPage(dataCtx, item != null ? item.DispalyId : 0));
}
示例8: ListViewOnItemTapped
protected void ListViewOnItemTapped (object sender, ItemTappedEventArgs e)
{
Debug.WriteLine ("ListViewOnItemTapped");
if (((ListView)sender).SelectedItem == null)
return;
var menuItem = e.Item as MainMenuItem;
if (menuItem != null) {
switch (menuItem.MenuType) {
case MenuType.Login:
{
break;
}
case MenuType.WebView:
{
var webViewViewModel = new WebViewViewModel (menuItem);
MasterViewModel.CurrentDetailPage = new CustomWebView (webViewViewModel);
break;
}
default:
{
//MenuType Standard
break;
}
}
((ListView)sender).SelectedItem = null;
}
}
示例9: OnItemTapped
async void OnItemTapped(object sender, ItemTappedEventArgs e)
{
if (!isEditing) {
Person tappedPerson = (Person)e.Item;
await this.Navigation.PushAsync(new ContactDetails(tappedPerson));
}
}
示例10: ListView_ItemTapped
void ListView_ItemTapped (object sender, ItemTappedEventArgs e)
{
if (e == null)
return; // has been set to null, do not 'process' tapped event
((ListView)sender).SelectedItem = null; // de-select the row
}
示例11: ItemsListView_OnItemTapped
private void ItemsListView_OnItemTapped(object sender, ItemTappedEventArgs e)
{
var model = BindingContext as UsageItemsViewModel;
if (model == null || e.Item == null) return;
model.CreateTaskCommand.Execute(e.Item);
}
示例12: ListViewTapped
void ListViewTapped(object sender, ItemTappedEventArgs e)
{
var list = sender as ListView;
if (list == null)
return;
list.SelectedItem = null;
}
示例13: showPresentation
void showPresentation(object sender, ItemTappedEventArgs e)
{
Navigation.PushAsync (new PresentationPage (
(e.Item as Presentation)
));
((ListView)sender).SelectedItem = null; // de-select the row
}
示例14: OnItemTapped
private async void OnItemTapped(Object sender, ItemTappedEventArgs e)
{
var selectedItem = ((ListView)sender).SelectedItem;
var sampleCategory = (SampleCategory) selectedItem;
await Navigation.PushAsync( GetPage( sampleCategory ) );
}
示例15: OnItemTapped
async void OnItemTapped(object sender, ItemTappedEventArgs e)
{
var itemSet = e.Item as StudyPlan;
if (itemSet == null) return;
if (AppCache.QuestionCache != null && Application.Current.Properties.ContainsKey("QuestionTemplate"))
{
object currentTemplate = null;
if (Application.Current.Properties.TryGetValue("QuestionTemplate", out currentTemplate))
{
var currTemplate = currentTemplate as QuestionTemplate;
List<Question> retList = null;
if (currTemplate != null && AppCache.QuestionCache != null && AppCache.QuestionCache.ContainsKey(currTemplate.UniqueGuid))
{
CurrentTemplate = currTemplate;
if (AppCache.QuestionCache.TryGetValue(currTemplate.UniqueGuid, out retList))
{
if (retList != null)
{
RefreshList(); //Saw some random error and adding this line to fix it
await Navigation.PushAsync(new QuestionListPage(retList, itemSet.Category, AppEnums.QuestionListFilter.StudyPlan));
return;
}
}
}
}
}
var list = await AppCache.GetData(null, null);
if (list != null && list.Count > 0)
RefreshList(); //Saw some random error and adding this line to fix it
await Navigation.PushAsync(new QuestionListPage(list, itemSet.Category, AppEnums.QuestionListFilter.StudyPlan));
}