Partager via


Diagram.NeedsRenumber Property

Set this true if you change the order of child shapes anywhere on the diagram. The ZOrder of each shape will be reset.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

Syntax

'Declaration
Public Property NeedsRenumber As Boolean
public bool NeedsRenumber { get; set; }
public:
property bool NeedsRenumber {
    bool get ();
    void set (bool value);
}
member NeedsRenumber : bool with get, set
function get NeedsRenumber () : boolean 
function set NeedsRenumber (value : boolean)

Property Value

Type: System.Boolean
true if the shapes in the diagram must be renumbered; otherwise, false.

Remarks

The order in which shapes are painted on the diagram is determined by the relative values of their ZOrder numbers. Lower-valued items are painted first, and so appear "underneath" shapes that are pained later. Normally the ZOrder is determined from the sequence of shapes in the NestedChildShapes and RelativeChildShapes lists. However, the ordering is not automatically re-computed when after every transaction. If you change the ordering, you should set NeedsRenumber to true to make sure that the ZOrder values are recomputed. See the example in ZOrder.

You are recommended not to set this value to false, and not to manually set ZOrder values. You can call Renumber if you want to force immediate renumbering, although this is not usually necessary.

.NET Framework Security

See Also

Reference

Diagram Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace

ZOrder

Renumber