DiagramModel
The common base class for all predefined model classes.
Properties
DataFormat : string
Gets or sets the format of this model's data.
HasUndoManager : bool
Whether undo manager exists. Returns false if the manager is suspended.
Initializing : bool
Gets or sets whether the model is being constructed or re-constructed.
IsChangingModel : bool
This property is true during a call to Boolean), indicating a change happening due to an undo or a redo.
IsInTransaction : bool
This property is true after a String) and before a corresponding String) or RollbackTransaction.
IsModified : bool
Gets or sets whether this model is considered changed from an earlier state.
IsUndoManagerSuspended : bool
Undo manager is suspended if this property is set to true.
Modifiable : bool
Gets or sets whether various model-changing methods are enabled.
SkipsUndoManager : bool
Gets or sets a flag that tells ModelChangedEventArgs) whether it should notify any UndoManager that a change has occurred.
UndoManager : UndoManager
Gets or sets the UndoManager for this model.
Methods
ChangeDataValue(ModelChangedEventArgs, bool)
This is called during undo or redo to effect state changes to model data.
- e
- an edit describing the change to be performed
- undo
- true if undoing; false if redoing
ChangeModel(ModelChangedEventArgs, bool)
This is called during an Undo or a Redo to actually make state changes to this model or to this model's data.
- e
- an edit describing the change to be performed
- undo
- true if undoing; false if redoing
ChangeModelValue(ModelChangedEventArgs, bool)
This is called during undo or redo to effect state changes to this model.
- e
- an edit describing the change to be performed
- undo
- true if undoing; false if redoing
CommitTransaction(string) : bool
Call the UndoManager's CommitTransaction method.
- tname
- a String describing the transaction
Returns: the value of the call to CommitTransaction
OnChanged(ModelChangedEventArgs)
Raises the Changed event.
- e
- an edit describing the change that just happened
RaiseChanged(ModelChangedEventArgs)
Raise a Changed event, given a ModelChangedEventArgs.
- e
- an edit describing the change that just happened
RaisePropertyChanged(string, object, object, object, object, object)
Raise a Changed event for a property change.
- propname
- a property name
- data
- the object whose property has just changed
- oldval
- the previous value for the property
- oldparam
- additional information for the old value
- newval
- the new value for the property
- newparam
- additional information for the new value
RaisePropertyChanged(string, object, object, object)
Raise a Changed event, given before and after values for a particular property.
- propname
- a property name
- data
- the object whose property has just changed
- oldval
- the previous value for the property
- newval
- the new value for the property
Reinitialize()
Reset the fields that should not be shared from a copy created by MemberwiseClone.
RollbackTransaction() : bool
Call the UndoManager's RollbackTransaction method.
Returns: the value of the call to RollbackTransaction
StartTransaction(string) : bool
Call the UndoManager's StartTransaction method.
- tname
- a String describing the transaction
Returns: the value of the call to StartTransaction
Events
Changed : EventHandler<ModelChangedEventArgs>
The Changed event is raised whenever the model is modified.