Example #1
0
 private void ItemTapped(object sender, TappedRoutedEventArgs e)
 {
     if (sender is Grid)
     {
         Grid g  = (Grid)sender;
         int  id = (int)g.Tag;
         Item i  = MHDatabaseHelper.GetItemSync(id);
         if (i.type.Equals("Weapon"))
         {
             Frame.Navigate(typeof(WeaponDetailsPage), i._id);
         }
         else if (i.type.Equals("Armor"))
         {
             Frame.Navigate(typeof(ArmorDetailsPage), i._id);
         }
         else if (i.type.Equals("Decoration"))
         {
             Frame.Navigate(typeof(DecorationDetailsPage), i._id);
         }
         else
         {
             Frame.Navigate(typeof(ItemDetailsPage), i._id);
         }
     }
 }
        private void textName_Tapped(object sender, TappedRoutedEventArgs e)
        {
            TextBlock tb = (TextBlock)e.OriginalSource;
            int       id = (int)tb.Tag;
            Item      i  = MHDatabaseHelper.GetItemSync(id);

            if (i.type.Equals("Weapon"))
            {
                Frame.Navigate(typeof(WeaponDetailsPage), i._id);
            }
            else if (i.type.Equals("Armor"))
            {
                Frame.Navigate(typeof(ArmorDetailsPage), i._id);
            }
            else if (i.type.Equals("Decoration"))
            {
                Frame.Navigate(typeof(DecorationDetailsPage), i._id);
            }
            else
            {
                Frame.Navigate(typeof(ItemDetailsPage), i._id);
            }
        }