2011-02-06 9 views
1

リストボックスには、拡大する可能性のあるデータの動的リストが表示されています。このlistobxの一番下に、ユーザーがすべてのアイテムをスクロールすると、テキストを表示したいと思います。状況に応じて、ボタンや別のリストボックスにすることもできます。しかし、まずテキストボックスを配置する方法を学びたい。私はフォーラムを検索し、グリッド、StackPanel、ScrollViewerを試してみました。何も動作していないようです。このコードは有望ですが、これでスクロールすることはできません。これは一般的なUIでなければならないと思います。どんな助け?Windows Phone:動的リストボックスの下部に別のコントロールを配置する方法

<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> 
     <TextBlock x:Name="ApplicationTitle" Text="tasteePic" Style="{StaticResource PhoneTextNormalStyle}"/> 
     <TextBlock x:Name="PageTitle" Text="I'm Hungry" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> 
     <ProgressBar Height="4" HorizontalAlignment="Left" Margin="10,10,0,0" Name="progressBar1" VerticalAlignment="Top" Width="460" /> 
    </StackPanel> 

    <ScrollViewer Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Visible"> 
     <StackPanel Margin="12,17,0,28"> 
      <ListBox Name="MenuItemListBox" VerticalAlignment="Top" SelectionChanged="MenuItemListBox_SelectionChanged"> 
       <ListBox.ItemTemplate> 
        <DataTemplate> 
         <StackPanel Orientation="Horizontal"> 
          <Image 
          Margin="4, 4, 4, 4" 
          Grid.Column="0" 
          delay:LowProfileImageLoader.UriSource="{Binding ThumbNailUrl}" /> 
          <StackPanel> 
           <TextBlock Text="{Binding Name}" FontWeight="Bold" /> 
           <TextBlock Text="{Binding BusinessName}" /> 
           <TextBlock Text="{Binding Price}" /> 
           <TextBlock Text="{Binding Neighborhood}" /> 
           <TextBlock Text="{Binding City}" /> 
          </StackPanel> 
         </StackPanel> 
        </DataTemplate> 
       </ListBox.ItemTemplate> 
      </ListBox> 
      <TextBlock Text="Test" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> 
     </StackPanel> 
    </ScrollViewer> 
</Grid> 

答えて

関連する問題