Scroll with ScrollViewer : ScrollViewer « Containers « Silverlight






Scroll with ScrollViewer

Scroll with ScrollViewer
    
<UserControl x:Class='SilverlightApplication3.MainPage'
    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' 
    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
    xmlns:d='http://schemas.microsoft.com/expression/blend/2008' 
    xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' 
    mc:Ignorable='d' 
    d:DesignWidth='640' 
    d:DesignHeight='480'>
  <ScrollViewer Background="AliceBlue" VerticalScrollBarVisibility="Auto">
    <Grid Margin="3,3,10,3">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"></ColumnDefinition>
        <ColumnDefinition Width="Auto"></ColumnDefinition>
      </Grid.ColumnDefinitions>

      <TextBox Grid.Row="0" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="0" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="1" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="1" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="2" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="2" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="3" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="3" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="4" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="4" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="5" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="5" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="6" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="6" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="7" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="7" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="8" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="8" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>

      <TextBox Grid.Row="9" Grid.Column="0" Margin="3" Height="Auto" VerticalAlignment="Center"></TextBox>
      <Button Grid.Row="9" Grid.Column="1" Margin="3" Padding="2" Content="Browse"></Button>
    </Grid>
  </ScrollViewer>


</UserControl>

   
    
    
    
  








Related examples in the same category

1.Providing Scrollable ContentProviding Scrollable Content
2.Creating a ScrollViewerCreating a ScrollViewer
3.ScrollViewer and Big EllipseScrollViewer and Big Ellipse
4.Use ScrollViewer to show an imageUse ScrollViewer to show an image
5.ScrollViewer holds Grid controlsScrollViewer holds Grid controls