New to Telerik UI for WinFormsStart a free 30-day trial

This interface gives the ability to create reusable providers for VisualElements that are in some relation with logical data objects.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public interface IVisualElementProvider

Methods

Cleans up when an element that is created with CreateElement() is no longer necessary.

C#
void CleanupElement(VisualElement element)
Parameters:elementVisualElement

Create element using the pased data

C#
VisualElement CreateElement(object data)
Parameters:dataobject

Logical data that will be used to initialize the element.

Returns:

VisualElement

The newly created element if everything is OK; null on error.

Check if an element can be initialized with some logical data.

C#
bool IsElementCompatible(VisualElement element, object data)
Parameters:elementVisualElementdataobjectReturns:

bool

true if the lement can be initialized with the data.

Initialize already created element with logical data (if possible).

C#
bool SetElementData(VisualElement element, object data)
Parameters:elementVisualElement

the element to be initilaized

dataobject

with this data the given element should be initialized

Returns:

bool

false if the element cannot be initialized with the given data