Share via


ModelService Class

Provides the main entry point that the designer uses to obtain the editing model.

Namespace:  Microsoft.Windows.Design.Services
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public MustInherit Class ModelService
'Usage
Dim instance As ModelService
public abstract class ModelService
public ref class ModelService abstract
public abstract class ModelService

Remarks

The ModelService class provides an entry point for the editing model and for global event notifications. ModelService is provided by the serialization engine and is used to gain access to the model.

In addition to the ModelService, the designer must map visuals to underlying model items. A 1:1 mapping between a visual and a model item is not required, but there must be an association between visuals and model items. The ViewService class fulfills this role.

The ModelService and ViewService classes are required for the designer to function. The DesignerView class, which is responsible for processing user input and routing it to commands, requires both of these services to map user input back to the model.

The public methods of ModelService can be called by any code. The protected methods are invoked by the editing model.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Services.ModelService

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

ModelService Members

Microsoft.Windows.Design.Services Namespace

ModelItem

ViewService

DesignerView

Other Resources

Editing Model Architecture

WPF Designer Extensibility