23 { |
23 { |
24 //Creation d'un Event pour Chaque Item Video |
24 //Creation d'un Event pour Chaque Item Video |
25 public event EventHandler EH_ListProject_ContactDown; |
25 public event EventHandler EH_ListProject_ContactDown; |
26 public string SelectedItem = ""; |
26 public string SelectedItem = ""; |
27 |
27 |
28 public UserControlListProject(List<Project> projects) |
28 public UserControlListProject(List<String> projectNames) |
29 { |
29 { |
30 InitializeComponent(); |
30 InitializeComponent(); |
31 OpenProjects(projects); |
31 OpenProjects(projectNames); |
32 } |
32 } |
33 |
33 |
34 private void OpenProjects(List<Project> projects) |
34 private void OpenProjects(List<String> projectNames) |
35 { |
35 { |
36 CustomListBoxItem Contener = new CustomListBoxItem(); |
36 CustomListBoxItem Contener = new CustomListBoxItem(); |
37 Contener.Name = "New Project"; |
37 Contener.Name = "New Project"; |
38 UserControlCustomLabel l = new UserControlCustomLabel("New Project"); |
38 UserControlCustomLabel l = new UserControlCustomLabel("New Project"); |
39 Contener.Content = l; |
39 Contener.Content = l; |
40 stackPanel.Children.Add(Contener); |
40 stackPanel.Children.Add(Contener); |
41 Contener.ContactTapGesture += Item_ContactTapGesture; |
41 Contener.ContactTapGesture += Item_ContactTapGesture; |
42 foreach (Project elt in projects) |
42 foreach (String projectName in projectNames) |
43 { |
43 { |
44 Contener = new CustomListBoxItem(); |
44 Contener = new CustomListBoxItem(); |
45 Contener.Name = elt.Name; |
45 Contener.Name = projectName; |
46 l = new UserControlCustomLabel(elt.Name); |
46 l = new UserControlCustomLabel(projectName); |
47 Contener.Content = l; |
47 Contener.Content = l; |
48 stackPanel.Children.Add(Contener); |
48 stackPanel.Children.Add(Contener); |
49 Contener.ContactTapGesture += Item_ContactTapGesture; |
49 Contener.ContactTapGesture += Item_ContactTapGesture; |
50 } |
50 } |
51 } |
51 } |