Extenders

Wisej.NET extenders are components that add and manage properties for other components.

circle-info

Since properties cannot be added to existing classes or objects, extender properties appear only in the designer. At runtime, they function as Set/Get methods on the extender.

Extenders must implement the IExtenderProviderarrow-up-right interface, determining which components can be extended through the CanExtend(component)arrow-up-right implementation.

Some extenders integrate into existing components. For example, TableLayoutPanel, FlexLayoutPanel, and FlowLayoutPanel add properties to their children. In web systems, this enables powerful features - when dropping a control into a FlexLayoutPanel, it gains properties like FillWeight, AlignX, AlignY. These properties are contextual to the FlexLayoutPanel container.

Other extenders, like Animation and ToolTip, operate without UI, adding features to extended controls.

circle-info

Multiple instances of the same extender can coexist. Adding multiple Animation extenders enables defining different animations for each control, triggered by different events.

IExtenderProvider

The System.ComponentModel.IExtenderProviderarrow-up-right is part of .NET's System.ComponentModel infrastructure, requiring one method:

bool CanExtend(object target)

Returns true if the extender supports extending the target object. Microsoft's documentation provides comprehensive examples.

ProvidePropertyAttribute

Extender classes declare their provided properties using ProvidePropertyAttributearrow-up-right declarations.

IWisejExtenderProvider

Last updated

Was this helpful?