Пример #1
0
 private void RemoveNote(TextStickyNote_UC obj)
 {
     if (NotesGrid.Children.Count > 1)
     {
         NotesGrid.Children.Remove(obj);
         obj = null;
     }
 }
Пример #2
0
        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);
        }