Extenders
Wisej.NET extenders are components that add and manage properties for other components.
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 IExtenderProvider interface, determining which components can be extended through the CanExtend(component) 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.
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.IExtenderProvider 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 ProvidePropertyAttribute declarations.
IWisejExtenderProvider
Last updated
Was this helpful?