Beispiel #1
0
        private void Item_UpRequested(object sender, RoutedEventArgs e)
        {
            CurriculumItem item  = e.Source as CurriculumItem;
            int            index = missionSP.Children.IndexOf(item) - 1;

            missionSP.Children.Remove(item);
            missionSP.Children.Insert(index, item);

            this.updateButtons();
        }
 private void addItem(string filename)
 {
     CurriculumItem item = new CurriculumItem(filename);
     item.Margin = new Thickness(0, 5, 0, 0);
     item.RemoveRequested += Item_RemoveRequested;
     item.UpRequested += Item_UpRequested;
     item.DownRequested += Item_DownRequested;
     missionSP.Children.Add(item);
 }