TreeView.CreateNode 方法

定义

返回 TreeNode 类的新实例。Returns a new instance of the TreeNode class. CreateNode() 是一个帮助器方法。The CreateNode() is a helper method.

protected public:
 virtual System::Web::UI::WebControls::TreeNode ^ CreateNode();
protected internal virtual System.Web.UI.WebControls.TreeNode CreateNode ();
abstract member CreateNode : unit -> System.Web.UI.WebControls.TreeNode
override this.CreateNode : unit -> System.Web.UI.WebControls.TreeNode
Protected Friend Overridable Function CreateNode () As TreeNode

返回

TreeNode

TreeNode 的新实例。A new instance of the TreeNode.

注解

CreateNode方法是一个帮助器方法,它返回类的新实例 TreeNodeThe CreateNode method is a helper method that returns a new instance of the TreeNode class.

CreateNode方法主要由控件开发人员使用。The CreateNode method is used primarily by control developers. 要通过扩展类扩展类的控件开发人员 TreeView TreeNode 应重写此方法以返回从派生的对象 TreeNodeControl developers that want to extend the TreeView class by extending the TreeNode class should override this method to return an object that derives from the TreeNode. 扩展类的一个常见原因 TreeNode 是重写 RenderPreTextRenderPostText 方法。A common reason to extend the TreeNode class is to override the RenderPreText and RenderPostText methods.

适用于