[UWP]可折叠UI的设计问题 [英] [UWP] Design problem with Collapsible UI

查看:57
本文介绍了[UWP]可折叠UI的设计问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在开发一个UWP应用程序,我们遇到了设计问题。详细信息:

We have been developing a UWP app in which we are stuck at a design problem. Details:

我们有一个列表,其中包含Item1,Item2,Item3,Item4 ....现在,点击Item1将展开Item1和Item1之间的列表。第2项和第2项类似于Item2& Item3。 

We have a list which has Item1, Item2, Item3, Item4 .... Now, clicking on Item1 will expand a list which is between Item1 & Item2 & similarly with Item2 & Item3. 

现在,点击Item2将展开其列表,并将折叠之前在Item1&之间打开的列表。 Item2。 

Now, Clicking on Item2 will expand its list and will collapse the list which was earlier opened between Item1 & Item2. 

基本上是一个列表视图,其中每个项目都附加了一个列表视图(可以随时隐藏和显示)。我们也需要处理点击事件等。 

Basically, a list view in which every item has attached one List view(can be hidden & shown anytime). We need to handle tapping events etc too. 

您能否提出一些解决此设计的好方法? 

Can you suggest some good approach in tackling this design? 

谢谢。

推荐答案

Hello Systems  Adob​​e Systems Incorporated,

Hello Adobe Systems Incorporated,

根据您的描述,您可以尝试使用< a href ="https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/tree-view">
TreeView ,用于说明UI中的嵌套关​​系。你也可以参考

TreeView示例
。至于功能"点击Item2将扩展其列表并将折叠之前在Item1&之间打开的列表。 Item2",您可以使用 TreeNode
IsExpanded 属性展开和折叠节点。

According to your description, you can try to use TreeView to illustrate nested relationships in your UI. And you can also refer to the TreeView Sample. As for the function "Clicking on Item2 will expand its list and will collapse the list which was earlier opened between Item1 & Item2", you can use IsExpanded property of TreeNode to expand and collapse the nodes.

祝您好运,

Breeze


这篇关于[UWP]可折叠UI的设计问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆