Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xaml 在WinRT中同步两个ListView_Xaml_Listview_Gridview_Synchronization_Windows Runtime - Fatal编程技术网

Xaml 在WinRT中同步两个ListView

Xaml 在WinRT中同步两个ListView,xaml,listview,gridview,synchronization,windows-runtime,Xaml,Listview,Gridview,Synchronization,Windows Runtime,我正在尝试同步WinRT应用程序中两个不同ListView的选定项,以便在其中一个中选择一个项,在另一个中选择相同的项。两个列表都绑定到同一数据源 我认为您可以使用ListView的IsSynchronizedWithCurrentItem属性来管理同步,但在我尝试将IsSynchronizedWithCurrentItem设置为true时,这似乎总是引发异常。不支持将IsSynchronizedWithCurrentItem设置为true,并且可能不适用于多个选定项目 是否有一种方法可以在Wi

我正在尝试同步WinRT应用程序中两个不同ListView的选定项,以便在其中一个中选择一个项,在另一个中选择相同的项。两个列表都绑定到同一数据源

我认为您可以使用ListView的IsSynchronizedWithCurrentItem属性来管理同步,但在我尝试将IsSynchronizedWithCurrentItem设置为true时,这似乎总是引发异常。不支持将IsSynchronizedWithCurrentItem设置为true,并且可能不适用于多个选定项目


是否有一种方法可以在WinRT中以编程方式选择给定ListView中的项?或者,保持两个列表中所选项目同步的正确方法是什么?

看看WinRT XAML工具包。它在示例应用程序中有一个ListViewExtensions示例,它几乎完全符合您的要求