本文整理汇总了C#中ItemTappedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ItemTappedEventArgs类的具体用法?C# ItemTappedEventArgs怎么用?C# ItemTappedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemTappedEventArgs类属于命名空间,在下文中一共展示了ItemTappedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:moljac,项目名称:Ph4ct3x,代码行数:32,代码来源:UserControlViewMainMenu.xaml.cs
示例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;
}
开发者ID:mhalkovitch,项目名称:Xamarim,代码行数:7,代码来源:DrilldownListViewByPage.xaml.cs
示例3: OnTap
async void OnTap(object sender, ItemTappedEventArgs e)
{
CurrentCategory = e.Item.ToString ();
await Navigation.PopAsync();
}
开发者ID:ttaulli,项目名称:BizDeducterApp,代码行数:7,代码来源:CategoryPage.xaml.cs
示例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;
}
开发者ID:auxua,项目名称:ConvenienceSystem2,代码行数:7,代码来源:ProductsPage.xaml.cs
示例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);
}
开发者ID:MMalikKhan,项目名称:TaskTimerApp,代码行数:7,代码来源:CompletedTaskPage.xaml.cs
示例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;
}
开发者ID:jsauvexamarin,项目名称:app-customers,代码行数:7,代码来源:CustomerListPage.xaml.cs
示例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));
}
开发者ID:lanreisee,项目名称:ExamPrep,代码行数:7,代码来源:QuestionListPage.xaml.cs
示例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;
}
}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:33,代码来源:Issue2357.xaml.cs
示例9: OnItemTapped
async void OnItemTapped(object sender, ItemTappedEventArgs e)
{
if (!isEditing) {
Person tappedPerson = (Person)e.Item;
await this.Navigation.PushAsync(new ContactDetails(tappedPerson));
}
}
开发者ID:psycosyd,项目名称:MyContacts,代码行数:7,代码来源:AllContacts.xaml.cs
示例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
}
开发者ID:Vineland,项目名称:DarkestNight.App,代码行数:7,代码来源:ActiveHeroesPage.xaml.cs
示例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);
}
开发者ID:MMalikKhan,项目名称:TaskTimerApp,代码行数:7,代码来源:UsageItemsPage.xaml.cs
示例12: ListViewTapped
void ListViewTapped(object sender, ItemTappedEventArgs e)
{
var list = sender as ListView;
if (list == null)
return;
list.SelectedItem = null;
}
开发者ID:RobGibbens,项目名称:app-evolve,代码行数:7,代码来源:SponsorsPage.xaml.cs
示例13: showPresentation
void showPresentation(object sender, ItemTappedEventArgs e)
{
Navigation.PushAsync (new PresentationPage (
(e.Item as Presentation)
));
((ListView)sender).SelectedItem = null; // de-select the row
}
开发者ID:gautierdelorme,项目名称:JPOINSAXamarin,代码行数:7,代码来源:PresentationsPage.cs
示例14: OnItemTapped
private async void OnItemTapped(Object sender, ItemTappedEventArgs e)
{
var selectedItem = ((ListView)sender).SelectedItem;
var sampleCategory = (SampleCategory) selectedItem;
await Navigation.PushAsync( GetPage( sampleCategory ) );
}
开发者ID:ahdproduction,项目名称:ConnectPeople,代码行数:7,代码来源:CategoriesListWithImages.xaml.cs
示例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));
}
开发者ID:lanreisee,项目名称:ExamPrep,代码行数:34,代码来源:StudyPlanPage.xaml.cs
示例16: OnItemTapped
private async void OnItemTapped(Object sender, ItemTappedEventArgs e)
{
var selectedItem = ((ListView) sender).SelectedItem;
var sampleCategory = (SampleCategory) selectedItem;
await SamplesListFromCategory.NavigateToCategory (sampleCategory, Navigation);
}
开发者ID:ahdproduction,项目名称:ConnectPeople,代码行数:7,代码来源:CategoriesListWithIcons.xaml.cs
示例17: listItemTapped
async void listItemTapped(object sender, ItemTappedEventArgs e)
{
listView.SelectedItem = null;
var open = await DisplayAlert("Open", "Open this page in browser?", "Yes", "No");
if (open)
Device.OpenUri(new Uri(((RssItem)e.Item).Link));
}
开发者ID:ytabuchi,项目名称:FirstStepXamarin,代码行数:7,代码来源:FeedPage.xaml.cs
示例18: CheckinList_Tapped
public void CheckinList_Tapped(object sender, ItemTappedEventArgs e)
{
var lv = sender as ListView;
var selected = lv.SelectedItem as listItems;
if(selected.content != null)
Navigation.PushAsync(selected.content);
}
开发者ID:vash47,项目名称:ihbi-project,代码行数:7,代码来源:DailyCheckinView.xaml.cs
示例19: NiceListView_ItemTapped
private void NiceListView_ItemTapped(object sender, ItemTappedEventArgs e)
{
SelectedItem = null;
if (ItemClickedCommand != null && ItemClickedCommand.CanExecute(e.Item))
ItemClickedCommand.Execute(e.Item);
}
开发者ID:XamarinGarage,项目名称:GiTracker,代码行数:7,代码来源:NiceListView.cs
示例20: listProfileDisponiveis_ItemTapped
async void listProfileDisponiveis_ItemTapped(object sender, ItemTappedEventArgs e)
{
App.DadosAlterados = true;
gateKey.Perfil = e.Item.ToString();
Console.WriteLine(gateKey.Perfil + " = novo perfil do user " + gateKey.SKeyName + " " + gateKey.SkeyBleId);
await new Repository<GateDevices>().UpdateAsync(gateKey);
await Navigation.PopAsync(true);
}
开发者ID:RobertoOFonseca,项目名称:MySafety,代码行数:8,代码来源:EditGateUser.cs
注:本文中的ItemTappedEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论