Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在显示动态表时遇到问题。基本上,我正在从服务器读取表格列表,我需要按顺序显示它们。每个表都有一个标题和许多列和行,这些在运行时是已知的。问题是每个表可以有任意数量的列和行,我需要在 xaml 中适应它。任何想法我怎样才能做到这一点?
是的,当响应来自服务器时,您可以动态绑定数据。有关更多信息,您可以下载 MSDN PeopleHub 或 PhotoHUb 示例应用程序中提供的示例,了解如何绑定数据。
为每个表使用一个网格,并在代码隐藏中设置行/列grid.RowDefinitions.Add(...)
grid.RowDefinitions.Add(...)