Applies to: Nevron Diagram for .NET
How to turn off inplaceedit for any shapes added to the document?
The best way to turn off inplaceedit for any shapes added to the document is to raise the InplaceEditable protection flag. For a shape this is done via the following code:
[C#]
NAbilities protection = shape.Protection;
protection.InplaceEdit =
true
;
shape.Protection = protection;
[VB.NET]
Dim
protection
As
NAbilities = shape.Protection
protection.InplaceEdit =
True
shape.Protection = protection
To enumerate all shapes in the diagram use the following code:
[C#]
NNodeTreeEnumerator en =
new
NNodeTreeEnumerator(drawingDocument, NFilters.TypeNShape, -1, TreeTraversalOrder.DepthFirstPreOrder);
while
(en.MoveNext())
{
NShape shape = (NShape)en.Current;
}
[VB.NET]
Dim
en
As
New
NNodeTreeEnumerator(drawingDocument, NFilters.TypeNShape, -1, TreeTraversalOrder.DepthFirstPreOrder)
While
en.MoveNext()
Dim
shape
As
NShape =
DirectCast
(en.Current, NShape)
End
While
Article ID: 47, Created On: 10/5/2010, Modified: 11/15/2010