private void RemoveNote(TextStickyNote_UC obj) { if (NotesGrid.Children.Count > 1) { NotesGrid.Children.Remove(obj); obj = null; } }
private void AddNormalNote(TextNoteViewModel noteBase = null) { TextStickyNote_UC sn = new TextStickyNote_UC(noteBase); sn.OnAddNote = AddNote; sn.OnRemoveNote = RemoveNote; sn.GotMouseCapture += StickyNote_UC_GotMouseCapture; //sn.LostMouseCapture+= NotesGrid.Children.Add(sn); }