This topic has not yet been rated - Rate this topic

HierarchicalDesigner Class

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
public sealed class HierarchicalDesigner : HierarchicalDataBoundControlDesigner
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
HierarchicalDesigner
Description

The Microsoft.SharePoint.WebControls.HierarchicalDesigner sealed class inherits from the System.Web.UI.Design.WebControls.HierarchicalDataBoundControlDesigner which is responsible for providing design time support to classes that inherit from System.Web.UI.WebControls.HierarchicalDataBoundControl.

HierarchicalDesigner is very simple in structure, containing an individual override for inherited the DataBind. The DataBind method is responsible for binding data to the control when design support is demanded. Within the overload, it will attempt to call DataBind on the BaseDataBoundControl object passed into the overload, otherwise it will call System.Web.UI.Design.WebControls.HierarchicalDataBoundControlDesigner.DataBind method supplied by its class derivation. 

The Usage Scenario

Because HierarchicalDesigner is sealed you cannot inherit from it to further manipulate design-time version of controls, limiting access to GetDesignTimeHtml and other methods that allow granular control over the control display attributes. Therefore, pragmatic usage is limited since it is easy to replicate the behavior in your own code with more extendable attributes. For this reason this class should be considered to be internal use only. 

In the below I am showing HierarchicalDesigner as a class decoration for an abstract class inheriting from BaseDataBoundControl. I am truncating the DesignerAttribute string value for readability, however you would have to fully qualify the reference. 

C# Code Example

[DesignerAttribute("Microsoft.SharePoint.WebControls. HierarchicalDesigner")] 
public abstract class MyDataBoundControl : BaseDataBoundControl{} 

Visual Basic .NET Code Example

<DesignerAttribute("Microsoft.SharePoint.WebControls. HierarchicalDesigner")> _
Public MustInherit Class MyDataBoundControl
Inherits BaseDataBoundControl
End Class