Extension loading is controlled with the ExtensionFor and ExtensionServer attributes.
ResizeThumbExtension has the following attributes:
[ExtensionServer(typeof(PrimarySelectionExtensionServer))] // inherited from PrimarySelectionAdornerProvider
[ExtensionFor(typeof(FrameworkElement))]
Responsible for extension loading is the ExtensionManager. It listenes to IComponentService.ComponentRegistered, and associates (via DesignItem.SetExtensionServers) the design item of newly created components with all applicable extension servers (there is only a single instance of each extension server (per design context)).
Extension servers control whether an extension should be applied to a design item (decided in the ShouldApplyExtensions method). Some extension servers make their extensions alive for the whole lifetime of the design item; others just when a certain condition is fulfilled. The PrimarySelectionExtensionServer creates extensions only for the item that is the primary selection. Whenever the primary selection is changed, the PrimarySelectionExtensionServer unloads its extensions on the old primary selected item and creates its extensions on the new primary selected item.