Tool.OnItemChanged Method
Adds activate and deactivate semantics to the Tool class.
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Protected Overrides NotOverridable Sub OnItemChanged ( _
context As EditingContext, _
previousItem As ContextItem _
)
protected override sealed void OnItemChanged(
EditingContext context,
ContextItem previousItem
)
protected:
virtual void OnItemChanged(
EditingContext^ context,
ContextItem^ previousItem
) override sealed
abstract OnItemChanged :
context:EditingContext *
previousItem:ContextItem -> unit
override OnItemChanged :
context:EditingContext *
previousItem:ContextItem -> unit
protected override final function OnItemChanged(
context : EditingContext,
previousItem : ContextItem
)
Parameters
- context
Type: Microsoft.Windows.Design.EditingContext
The editing context where the change is occurring.
- previousItem
Type: Microsoft.Windows.Design.ContextItem
The previous tool.
Remarks
The OnItemChanged method is an override to the notification method found on the ContextItem class. This override adds activate and deactivate semantics to the Tool class. Essentially, OnItemChanged performs the following pseudo code: _previousTool = (Tool)old; _previousTool.OnDeactivate(); OnActivate(_previousTool);. Tool seals this method to enforce the use of the OnActivate and OnDeactivate methods.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace