积极答复者
hi,谁能帮我看一下SemanticZoom 控件缩小视图回退不能定位到分类的位置

问题
答案
-
你可以看看是不是你ZoomedOutView的ItemsSource设置的有问题,这个ItemsSource一定是和ZoomedInView是一个source,你可以参考下SDK的sample:
List<GroupInfoList<object>> dataLetter = _storeData.GetGroupsByLetter(); cvs2.Source = dataLetter; (semanticZoom.ZoomedOutView as ListViewBase).ItemsSource = cvs2.View.CollectionGroups;
http://code.msdn.microsoft.com/windowsapps/GroupedGridView-77c59e8e
如果还是自己解决不了,我建议你分享一下你的后台代码,这杨我能在我这边重现
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Aaron XueModerator 2012年9月11日 7:52
-
hello,我搞定了。问题的原因是 InView 我没有关联 OutView 的资源。
我解决的办法是:
//给 SemanticZoom 添加 ViewChangeStarted="ViewChangeStarted"事件
<SemanticZoom x:Name="semanticZoom" Grid.Row="1" ViewChangeStarted="ViewChangeStarted">在处理事件中,判断是否是缩小视图:
ViewChangeStarted(Platform::Object^ sender, Windows::UI::Xaml::Controls::SemanticZoomViewChangedEventArgs^ e)
{
if (!semanticZoom->IsZoomedInViewActive) //如果是缩小视图
{//这一行代码写的很诡异,从C#转过来的,只好这么暂时照抄一下。。。
(safe_cast<ListViewBase^>(semanticZoom->ZoomedOutView))->ItemsSource = groupedItemsViewSource->View->CollectionGroups;
}
}
全部回复
-
你可以看看是不是你ZoomedOutView的ItemsSource设置的有问题,这个ItemsSource一定是和ZoomedInView是一个source,你可以参考下SDK的sample:
List<GroupInfoList<object>> dataLetter = _storeData.GetGroupsByLetter(); cvs2.Source = dataLetter; (semanticZoom.ZoomedOutView as ListViewBase).ItemsSource = cvs2.View.CollectionGroups;
http://code.msdn.microsoft.com/windowsapps/GroupedGridView-77c59e8e
如果还是自己解决不了,我建议你分享一下你的后台代码,这杨我能在我这边重现
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Aaron XueModerator 2012年9月11日 7:52
-
hello,我搞定了。问题的原因是 InView 我没有关联 OutView 的资源。
我解决的办法是:
//给 SemanticZoom 添加 ViewChangeStarted="ViewChangeStarted"事件
<SemanticZoom x:Name="semanticZoom" Grid.Row="1" ViewChangeStarted="ViewChangeStarted">在处理事件中,判断是否是缩小视图:
ViewChangeStarted(Platform::Object^ sender, Windows::UI::Xaml::Controls::SemanticZoomViewChangedEventArgs^ e)
{
if (!semanticZoom->IsZoomedInViewActive) //如果是缩小视图
{//这一行代码写的很诡异,从C#转过来的,只好这么暂时照抄一下。。。
(safe_cast<ListViewBase^>(semanticZoom->ZoomedOutView))->ItemsSource = groupedItemsViewSource->View->CollectionGroups;
}
}