public void TreeViewItem_Expanded(object sender, RoutedEventArgs e) { Msg.Publication("Evennement TreeViewItem_Expanded"); TreeViewItem item = e.Source as TreeViewItem; TviInfoElement infos = (TviInfoElement)item.Tag; switch (infos.Type) { case "D": item.Items.Clear(); foreach (TreeViewItem nouvelItem in ScanRepertoire(infos.Chemin)) { item.Items.Add(nouvelItem); } break; case "F": ongletImage oImg = ongletImage.Instance; oImg.Tab07ImageB01.Source = new BitmapImage(new Uri(infos.Chemin)); Msg.Publication("Ouverture fichier : " + infos.Chemin); break; } }
public ongletImage() { InitializeComponent(); Instance = this; }