Represents a single piece of state in the designer.
Assembly: Microsoft.Windows.Design (in Microsoft.Windows.Design.dll)
Context items are immutable objects that contain state. Some context items also define methods that can perform operations on the state they contain. is the base class from which all context items must derive.
A context item may come and go in an editing context. Context items are transient, but they always have a value. Even if a particular context item is not in the context, a default value is always provided. Therefore, the context never returns null.
Unlike a service, the value of a context item can change at any moment. This means that you should not cache context items. Code that uses the context can subscribe to a SubscribeContextCallback<ContextItemType> that is raised when a particular type of context item changes.
A class derived from must define an empty constructor. This empty constructor version of a context item represents its default value. This default value is the value returned from GetValue if the ContextItemManager does not contain a context item of the requested type.