Hi Jason,
To protect the library from masters deletion -> raise its RemoveElements protection. In fact for a completely locked down library you can protect it from RemoveElements, InsertElements and ReorderElements like this:
NAbilities protection = libraryDocument.Protection;
protection.RemoveElements = true;
protection.ReorderElements = true;
protection.InsertElements = true;
libraryDocument.Protection = protection;
Another way to prevent inserting elements with drag and drop is to set the AllowDrop property of the library view to false:
libraryView.AllowDrop = false;
When a certain action cannot be performed because of protection, the view will display a message. You can disable view messages like this:
libraryView.ShowMessages = false;
Best Regards,
Nevron Support Team