使用包含 N 个数据透视项的数据透视视图进行逻辑删除
我有一个数据透视视图,其中的项目是动态创建的。每个视图中的视图都是蝇量级和虚拟化,因此内存不会超过允许的最大值。当发生逻辑删除时,我保存数据透视项数量所基于的对象以及数据透视视图的选定索引。返回页面后,数据透视项已成功重新创建,但是当您设置所选索引时,我在 App.xaml.cs 中收到未处理的异常,显示“参数不正确”我已验证此为来源通过注释掉设置pivotview.SelectedIndex值的行来解决异常。
关于为什么会发生这种情况有什么想法吗?
I have a pivotview in which the items are created dynamically. The views in each one is flyweight & virtualized so memory does not exceed the max allowed. When tombstoning occurs, I save the object which the number of pivot items is based on as well as the selected index of the pivotview. After returning to the page, the pivot items are successfully re-created, but when you set the selected index, I get an unhandled exception in App.xaml.cs that says "the parameter is incorrect" I have verified this as the source of the exception by commenting out the line that sets the pivotview.SelectedIndex value.
any ideas as to why this happens?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
设置数据透视表的 SelectedIndex 可以在 Loaded 事件中完成。
此问题记录在此处。
将透视控件 SelectedItem/SelectedIndex 属性设置为第三个透视项 (WP7) 时出现未处理的异常 |微软连接
Setting the pivot's SelectedIndex can be done in the Loaded event.
This issue is documented here.
Unhandled Exception When Setting Pivot Control SelectedItem/SelectedIndex Property to 3rd Pivot Item (WP7) | Microsoft Connect