Class PropertyHelper
Utility to scan properties through reflection.
Inheritance
Namespace: Telerik.Windows.Controls.Diagrams.Extensions
Assembly: Telerik.Windows.Controls.Diagrams.Extensions.dll
Syntax
public static class PropertyHelper : Object
Methods
ConvertValue(Type, Object)
Converts the value.
Declaration
public static object ConvertValue(Type targetType, object value)
Parameters
|
System.Type
targetType
Type of the target. |
|
System.Object
value
The value. |
Returns
|
System.Object
|
GetCoercedValue(String, Object)
Gets the coerced value.
Declaration
public static object GetCoercedValue(string propertyName, object source)
Parameters
|
System.String
propertyName
Name of the property. |
|
System.Object
source
The source. |
Returns
|
System.Object
|
GetDefaultValue(Type)
Gets the default value.
Declaration
public static object GetDefaultValue(Type type)
Parameters
|
System.Type
type
The type. |
Returns
|
System.Object
|
GetValue(String, Object)
Gets the value of the property.
Declaration
public static object GetValue(string propertyName, object source)
Parameters
|
System.String
propertyName
Name of the property. |
|
System.Object
source
The source. |
Returns
|
System.Object
|
GetValueByPropertyPath(String, Object, out Boolean)
Gets the value of property specified by a propertyPath string.
Declaration
public static object GetValueByPropertyPath(string propertyPath, object source, out bool isEditedObjectUiElement)
Parameters
|
System.String
propertyPath
|
|
System.Object
source
|
|
System.Boolean
isEditedObjectUiElement
|
Returns
|
System.Object
|
SetProperty(String, Object, Object)
Sets the value of the property.
Declaration
public static bool SetProperty(string propertyName, object source, object value)
Parameters
|
System.String
propertyName
Name of the property. |
|
System.Object
source
The source. |
|
System.Object
value
The value. |
Returns
|
System.Boolean
|
SetPropertyViaPropertyPath(String, IDiagramItem, Object)
Sets property of the given IDiagramItem. The path to the property is given in the propertyPath string parameter.
Declaration
public static void SetPropertyViaPropertyPath(string propertyPath, IDiagramItem diagramItem, object newValue)
Parameters
|
System.String
propertyPath
|
|
IDiagramItem
diagramItem
|
|
System.Object
newValue
|