Click or drag to resize
ControlsHelperGetParentPropertyParentControlType, PropertyType Method
Gets property value from parent control

Namespace: CMS.ExtendedControls
Assembly: CMS.ExtendedControls (in CMS.ExtendedControls.dll) Version: 8.2.23
Syntax
C#
public static PropertyType GetParentProperty<ParentControlType, PropertyType>(
	Control control,
	Func<ParentControlType, PropertyType> propFunc,
	PropertyType defaultValue
)
where ParentControlType : Control

Parameters

control
Type: System.Web.UIControl
Control
propFunc
Type: SystemFuncParentControlType, PropertyType
Function that gets property value
defaultValue
Type: PropertyType
Default property value if no suitable parent control found

Type Parameters

ParentControlType
PropertyType

Return Value

Type: PropertyType
See Also