2012-11-15 71 views
3

我有嵌入語義縮放控件中ListView控件:XAML:使用語義縮放和ListView MakeVisible不滾動

<SemanticZoom x:Name="diarySemanticZoom" Grid.Row="1"> 
      <SemanticZoom.ZoomedOutView> 
       <GridView> 
        ... 
       </GridView> 
      </SemanticZoom.ZoomedOutView> 
      <SemanticZoom.ZoomedInView> 
        <ListView 
         x:Name="diaryListView" 
         AutomationProperties.AutomationId="diaryListView" 
         AutomationProperties.Name="Grouped Items" 
         Grid.Row="1" 
         ItemsSource="{Binding Source={StaticResource itemsViewSource}}" 
         SelectionMode="Single" 
         ScrollViewer.IsHorizontalScrollChainingEnabled="False" 
         ScrollViewer.IsVerticalScrollChainingEnabled="False" 
         ScrollViewer.HorizontalScrollBarVisibility="Visible" 
         > 
         <ListView.ItemsPanel> 
          <ItemsPanelTemplate> 
           <WrapGrid Orientation="Vertical" 
           MaximumRowsOrColumns="1" x:Name="insideWrapGrid"/> 
         </ItemsPanelTemplate> ... 

當XAML負載我想滾動項目列表視圖中

protected override void LoadState(Object navigationParameter, 
        Dictionary<String, Object> pageState) 
{ 
    var diaryDaysModel = DiaryDays.DiaryDayList; 
    /* Group the days */ 
    var daysViewModelGroup = from ddm in diaryDaysModel 
          group ddm by new { ddm.MonthName, ddm.DayNo } into grp 
          orderby grp.Key.DayNo 
          select new { Key = grp.Key, Items = grp }; 

    itemsViewSource.Source = daysViewModelGroup; 
    diaryListView.SelectedIndex = 5; 
    var zoomLoc = new SemanticZoomLocation() { Item = diaryListView.SelectedItem }; 
    diarySemanticZoom.ZoomedInView.MakeVisible(zoomLoc); 
    diaryListView.MakeVisible(zoomLoc); 

} 

我已經嘗試了很多選擇,但迄今爲止沒有一個似乎走動

回答

1

滾動您應該能夠滾動。 如果要垂直滾動,請編輯ScrollViewer.IsVerticalScrollBarEnabled =「啓用」。