一、问题描述
在A面板关闭后重新打开,调用Grid中的 Reposition() 方法和SceollView中的 ResetPosition() 方法,ScrollView中的视图并未刷新排列。
二、方法解释
首先在分析之前我们需要清楚这两个方法的解释,下面是官方的解释:
1. Grid
//Recalculate the position of all elements within the grid, sorting them alphabetically if necessary
//重新计算网格中所有元素的位置,必要时按字母顺序对它们排序
Reposition()
2. ScrollView
//Reset the scroll view’s position to the top-left corner.
//将滚动视图的位置重置到左上角。
//
//It’s recommended to call this function before AND after you re-populate the scroll view’s contents (ex: switching window tabs).
//建议在你重新填充滚动视图的内容(例如:切换窗口标签页)之前和之后调用这个函数
//Another option is to populate the scroll view’s contents, reset its position, then call this function to reposition the clipping.
//另一个选