silverlight 虚拟化 treeview
要做一颗树,已经是点击加载节点了 ,但是节点太多了 3w左右,需要接住虚拟化实现
下面是我虚拟化的东西 也实现了 但是
在点击节点的时候 ,treeview的滚动条自己滚动了
<sdk:TreeView x:Name="virtualTree" Margin="0,0,0,13"> <sdk:TreeView.ItemsPanel> <ItemsPanelTemplate> <!--<local:VirtrulaTreeNodesTest></local:VirtrulaTreeNodesTest>--> <VirtualizingStackPanel> </VirtualizingStackPanel> </ItemsPanelTemplate> </sdk:TreeView.ItemsPanel> </sdk:TreeView>
<ScrollViewer Grid.Row="0" Background="Red" VirtualizingStackPanel.VirtualizationMode="Recycling" VerticalScrollBarVisibility="Auto"> <sdk:TreeView x:Name="virtualTree" Margin="0,0,0,13"> <sdk:TreeView.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel> </VirtualizingStackPanel> </ItemsPanelTemplate> </sdk:TreeView.ItemsPanel> </sdk:TreeView></ScrollViewer>