See Get Started with WinUI 2 for more info. To use the code in this article with WinUI 2, use an alias in XAML (we use muxc) to represent the Windows UI Library APIs that are included in your project. We recommend using the latest WinUI 2 to get the most current styles, templates, and features for all controls. Get the app from the Microsoft Store or get the source code on GitHub. The WinUI 2 Gallery app includes interactive examples of most WinUI 2 controls, features, and functionality. Open the WinUI 2 Gallery app and see the TreeView in action.WinUI 2 Apis: TreeView class, TreeViewNode class, TreeView.ItemsSource property.UWP APIs: TreeView class, TreeViewNode class, TreeView.ItemsSource property.For most drill-in scenarios, a regular list view is appropriate. Use a TreeView when items have nested list items, and if it is important to illustrate the hierarchical relationship of items to their peers and nodes.Īvoid using TreeView if highlighting the nested relationship of an item is not a priority. Arbitrary types of content in a TreeViewItem.TreeViewItem as the root of the TreeView item template.Data binding to the ItemsSource property on TreeView and TreeViewItem.The TreeView APIs support the following features: ![]() ![]() For example, if you show a file system hierarchy, you could use folder icons for the parent notes and file icons for the leaf nodes. You can include an icon in the tree view item data template to represent nodes. ![]() Collapsed nodes use a chevron pointing to the right, and expanded nodes use a chevron pointing down. The tree view uses a combination of indentation and icons to represent the nested relationship between parent nodes and child nodes. It can be used to illustrate a folder structure or nested relationships in your UI. The tree view control enables a hierarchical list with expanding and collapsing nodes that contain nested items.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |