Créer un groupe de boutons par programmation en C# Win Phone 8 app

J'ai un problème dans mon fichier C#. J'ai créer 6 boutons par programme sur l'emplacement spécifique. mais ma boucle ne fonctionne pas..

juste un bouton de la montre et de tous les boutons.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
//using System.Array;

namespace AimPass
{
     public partial class main : PhoneApplicationPage
     {
    public main()
     {
        InitializeComponent();

    }

private void newbutton(object sender, RoutedEventArgs e)
    {
 //How many buttons do you want ?
        int NumOfButtons = 6;
        //X Location of each created button in the panel
        int loc = 20;
        for (int i = 1; i <= NumOfButtons; i++)
        {
            Button btn = new Button();
            {
                btn.Name = "Btn-" + i.ToString();
              btn.Size= new Size(50, 20);
               btn.Tag = i;
                btn.Content = "Browse-" + i.ToString();
              btn.location = new Point(5, loc);
            }
            //Add Click event Handler for each created button
           btn.Click += Buttons_Click;
            loc += 20;
            //Add the created btn to grid
            grid.Children.Add(btn);
        }
}

}

}

il y a 2,3 erreurs vient..
en utilisant le Système.De Windows.Les contrôles.Les boutons ne contient pas de définition de l'emplacement et de la taille...???

    btn.Click += Buttons_Click; does not exist in current context..

Et boucle ne fonctionne pas..Juste l'un des boutons vient à l'exception de 6 boutons..

Je veux ajouter un bouton sur un emplacement spécifique..Donc ces erreurs vient à ma demande..
Merci d'avance pour la résolution de ce..:)

InformationsquelleAutor Arsal | 2013-12-17