EditingContext Class

Contains contextual state about a designer.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.EditingContext

Namespace:  Microsoft.Windows.Design
Assembly:  Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)

Syntax

'Declaration
Public Class EditingContext _
    Implements IDisposable
public class EditingContext : IDisposable
public ref class EditingContext : IDisposable
type EditingContext =  
    class
        interface IDisposable
    end
public class EditingContext implements IDisposable

The EditingContext type exposes the following members.

Constructors

  Name Description
Public method EditingContext Initializes a new instance of the EditingContext class.

Top

Properties

  Name Description
Public property Items Gets the local collection of context items offered by this editing context.
Public property Services Gets the service manager for this editing context.

Top

Methods

  Name Description
Protected method CreateContextItemManager Creates an instance of the context item manager to be returned from the Items property.
Protected method CreateServiceManager Creates an instance of the service manager to be returned from the Services property.
Public method Dispose() Releases all resources used by the EditingContext.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the EditingContext and optionally releases the managed resources.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Finalizer that implements the IDisposable pattern. (Overrides Object.Finalize().)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event Disposing Occurs when the Dispose method is called.

Top

Remarks

The EditingContext class includes permanent state, such as a list of services that are running in the designer. It also includes transient state that consists of context items. Examples of transient context item state include the set of currently selected objects, and the editing tool being used to manipulate objects on the design surface. The editing context is designed to be a concrete class for ease of use. It does have a protected API that can be used to replace its implementation.

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

Microsoft.Windows.Design Namespace

ServiceManager

ContextItemManager

ContextItem

FeatureManager

Other Resources

Editing Context Architecture

Understanding WPF Designer Extensibility