Beispiel #1
0
        private void AddModule(ModuleSheetNotification notif)
        {
            string name = "" + notif.id;

            while (ModulesSheetContent.FindName(name) != null)
            {
                name = "" + (int.Parse(name) + 1);
            }

            ModuleSheet button = new ModuleSheet();

            button.DataContext = notif;

            button.Name   = name;
            button.Margin = new Thickness(0, 5, 0, 0);

            ModulesSheetContent.Children.Add(button);
        }
 private void RemoveModule(int ID)
 {
     ModulesSheetContent.Children.Remove((UIElement)ModulesSheetContent.FindName("" + ID));
 }