Create an editable treeview control in execution of the xml document (part 5)

Source: Internet
Author: User
Running treeview control
For perfection, list 4 contains the final treevie control of VB. NET version and or C # version. To make it easier to use, I have redefined the structure and code. The KeyDown Control is added to support some default shortcut keys, such as Control-N (new), F2 (edit), and DEL (delete ).
It seems that there is no need to attach any event, so the final api contains a method and eight attributes. They are listed in Table 1. Most of them are simple signs or default switches, I added them so that you can choose to use them to enhance the editable features of your application.

Table 1: Attributes and methods of the xmltreeview control. You can use them in your application.
Attribute
Type
Parameter
Description

XmlDropTarget
Get
System. Xml. XmlNode
The XML node corresponding to the currently selected node in the TreeView

ActiveXmlDocument
Get
System. Xml. XmlDocument
The XML document bound to the TreeView. This updates as the tree changes

XPathFilter
Get; Set
String
The XPath filter used to identify the element or attribute whose value will be used to display the folder's name. A folder constitutes the tree view's smallest navigable unit

XmlInsertionNode
Get; Set
System. Xml. XmlNode
The template for a new folder. The TreeView caches this, and clones it when a new folder is required.

DragDropActive
Get; Set
Bool
Flag denoting whether a drag/drop operation is currently in progress.

EnableEditNode
Get; Set
Bool
Flag denoting whether label editing is supported (default is yes)

EnableDeleteNode
Get; Set

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.