Profile Picture

Locking Down a LibraryView

Posted By Jason Irby 14 Years Ago
Author
Message
Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
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



Jason Irby
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 59, Visits: 77

 

Hello,

 

I have created my own shape library and am loading it into a LibraryView control so the user can drag my predefined shapes on to a diagram.  However, I do not wish them to be able to:

1. Delete any of the shape masters currently on the libraryview

2. Drag and diagram shapes back onto the libraryview causing duplicates of the masters

 

I was looking for some kind of protection property to set but I could find none. 

Is there any way to lock dow nthe libraryview to prevent the user from modifying it but still be able to pull off it?

 

Thanks in advance,

Jason





Similar Topics


Reading This Topic