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

Represents the custom property provider.

Definition

Namespace:Telerik.Windows.Persistence.Services

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public interface ICustomPropertyProvider : IPersistenceProvider

Methods

Gets the custom properties.

C#
CustomPropertyInfo[] GetCustomProperties()
Returns:

CustomPropertyInfo[]

Initializes the object. Intended to place the context object in an appropriate state, before setting any properties.

C#
void InitializeObject(object context)
Parameters:contextobject

The context - the owner object.

Initializes the saved value. Invoked when the deserialized value is null. See remarks.

C#
object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
Parameters:customPropertyInfoCustomPropertyInfo

The custom property info.

contextobject

The context.

Returns:

object

Returns the initialized value.

Remarks:

When the deserialized fails to recreate the saved value (i.e. create a new instance of the class or the value is null) this method will be invoked to provide a valid value.

Provides the value for a specific property.

C#
object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
Parameters:customPropertyInfoCustomPropertyInfo

The custom property info.

contextobject

The context - the owner object.

Returns:

object

Returns the value for the specific property.

Restores the value for a specific property.

C#
void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
Parameters:customPropertyInfoCustomPropertyInfo

The custom property info.

contextobject

The context - the owner object.

valueobject

The saved value for the property.