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

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

See Also

Reference

Tool Class

Microsoft.Windows.Design.Interaction Namespace

Other Resources

Tool Architecture

WPF Designer Extensibility Architecture