// Called during a remove operation
 private void detach_Widget(Widget w)
 {
     w.WidgetCategory = null;
 }
 public void AddFromCategorySide()
 {
     var widget = new Widget()
     {
         WidgetName = "Widget " + counter
     };
     var category = counter % 2 == 0 ? _category2 : _category1;
     category.Widgets.Add(widget);
     db.Widgets.InsertOnSubmit(widget);
     db.SubmitChanges();
     counter += 1;
     Refresh();
 }
 // Called during an add operation
 private void attach_Widget(Widget w)
 {
     w.WidgetCategory = this;
 }