Share via


MoveRule Class

Represents a rule that is called when an object is moved in the model.

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

Syntax

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

Remarks

When an object of a specific type is moved in the model and you want to do something programmatically, you define a class derived from MoveRule.

A RuleOnAttribute attribute placed on the class indicates what type of object the rule works on and when the rule should fire.

The rule is called when the object of the specified type is moved in the model, whether it is moved in the UI or programmatically.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Rule
    Microsoft.VisualStudio.Modeling.MoveRule

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

MoveRule Members

Microsoft.VisualStudio.Modeling Namespace

Other Resources

How to: Create Custom Rules