ChangeRule Class

Represents a rule that is called when a change happens to an element in the model.

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

Syntax

'Declaration
Public MustInherit Class ChangeRule _
    Inherits Rule
'Usage
Dim instance As ChangeRule
public abstract class ChangeRule : Rule
public ref class ChangeRule abstract : public Rule
public abstract class ChangeRule extends Rule

Remarks

A RuleOnAttribute attribute placed on the class indicates what type of object the rule works on and when the rule should fire, either inline, local transaction commit, or top level transaction commit.

The rule is called when a change occurs to the object of the specified type in the model, whether the change is made in the UI or programmatically.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Rule
    Microsoft.VisualStudio.Modeling.ChangeRule
      Microsoft.VisualStudio.Modeling.Diagrams.LineLabelAutoPlacementChangeRule
      Microsoft.VisualStudio.Modeling.Diagrams.LinkShapeChangedRule

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ChangeRule Members

Microsoft.VisualStudio.Modeling Namespace

Other Resources

How to: Create Custom Rules