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

Utility to scan properties through reflection.

Definition

Namespace:Telerik.Windows.Controls.Diagrams.Extensions

Assembly:Telerik.Windows.Controls.Diagrams.Extensions.dll

Syntax:

C#
public static class PropertyHelper

Inheritance: objectPropertyHelper

Methods

Converts the value.

C#
public static object ConvertValue(Type targetType, object value)
Parameters:targetTypeType

Type of the target.

valueobject

The value.

Returns:

object

Gets the coerced value.

C#
public static object GetCoercedValue(string propertyName, object source)
Parameters:propertyNamestring

Name of the property.

sourceobject

The source.

Returns:

object

Gets the default value.

C#
public static object GetDefaultValue(Type type)
Parameters:typeType

The type.

Returns:

object

Gets the value of the property.

C#
public static object GetValue(string propertyName, object source)
Parameters:propertyNamestring

Name of the property.

sourceobject

The source.

Returns:

object

Gets the value of property specified by a propertyPath string.

C#
public static object GetValueByPropertyPath(string propertyPath, object source, out bool isEditedObjectUiElement)
Parameters:propertyPathstringsourceobjectisEditedObjectUiElementboolReturns:

object

Sets the value of the property.

C#
public static bool SetProperty(string propertyName, object source, object value)
Parameters:propertyNamestring

Name of the property.

sourceobject

The source.

valueobject

The value.

Returns:

bool

Sets property of the given IDiagramItem. The path to the property is given in the propertyPath string parameter.

C#
public static void SetPropertyViaPropertyPath(string propertyPath, IDiagramItem diagramItem, object newValue)
Parameters:propertyPathstringdiagramItemIDiagramItemnewValueobject