gpt4 book ai didi

c# - 在 Windows 10 应用程序中实现 TreeView

转载 作者:行者123 更新时间:2023-11-30 18:21:18 25 4
gpt4 key购买 nike

我正在创建一个通用 Windows 应用程序,它可以从 Chrome 读取“收藏夹”并将其显示为 TreeView 。收藏夹是从 Chrome 浏览器的书签文件中获取的,但是我面临的问题是为 Windows 10 实现 TreeView 结构。我发现的所有样本通常都是针对 Windows 8.1 的,默认情况下没有针对 Windows 10 的 TreeView 控件。有人可以提供在 UWP 中实现 TreeView 的解决方案吗

最佳答案

Microsoft docs 中所述

A TreeView is a hierarchical list pattern with expanding and collapsing nodes that contain nested items. Nested items can be additional nodes or regular list items. You can use a ListView to build a tree view to illustrate a folder structure or nested relationships in your UI.

因此使用ListView 来实现 TreeView 。该示例可在此处获得: TreeView (XAML) sample

关于c# - 在 Windows 10 应用程序中实现 TreeView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35721606/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com