Class
PropertyHelper

Utility to scan properties through reflection.

Definition

Namespace:Telerik.Windows.Controls.Diagrams.Extensions

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

Syntax:

cs-api-definition
public static class PropertyHelper

Inheritance: objectPropertyHelper

Methods

ConvertValue(Type, object)

Converts the value.

Declaration

cs-api-definition
public static object ConvertValue(Type targetType, object value)

Parameters

targetType

Type

Type of the target.

value

object

The value.

Returns

object

GetCoercedValue(string, object)

Gets the coerced value.

Declaration

cs-api-definition
public static object GetCoercedValue(string propertyName, object source)

Parameters

propertyName

string

Name of the property.

source

object

The source.

Returns

object

GetDefaultValue(Type)

Gets the default value.

Declaration

cs-api-definition
public static object GetDefaultValue(Type type)

Parameters

type

Type

The type.

Returns

object

GetValue(string, object)

Gets the value of the property.

Declaration

cs-api-definition
public static object GetValue(string propertyName, object source)

Parameters

propertyName

string

Name of the property.

source

object

The source.

Returns

object

GetValueByPropertyPath(string, object, out bool)

Gets the value of property specified by a propertyPath string.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
public static object GetValueByPropertyPath(string propertyPath, object source, out bool isEditedObjectUiElement)

Parameters

propertyPath

string

source

object

isEditedObjectUiElement

bool

Returns

object

SetProperty(string, object, object)

Sets the value of the property.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public static bool SetProperty(string propertyName, object source, object value)

Parameters

propertyName

string

Name of the property.

source

object

The source.

value

object

The value.

Returns

bool

SetPropertyViaPropertyPath(string, IDiagramItem, object)

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

Declaration

cs-api-definition
public static void SetPropertyViaPropertyPath(string propertyPath, IDiagramItem diagramItem, object newValue)

Parameters

propertyPath

string

diagramItem

IDiagramItem

newValue

object